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

Contract Prices

/timeseries/market-contract-prices

PreviousCandlesNextFunding Rates

Last updated 7 months ago

Was this helpful?

Definition

Market contract prices are prices relevant to derivatives contract. It consists of the mark price, index price, and estimated settlement price.

The estimated settlement price is an estimate of the settlement price if the contract were to be settled

Details

Exchanges report the following contract prices:

  • Mark price: The mark price is used by an exchange to calculate a trader's unrealized profit and losses and to trigger liquidations for risk management purposes. Each exchange applies a unique methodology for calculating the mark price, which typically is a function of the index price, funding rate, and the best bid and best ask with some smoothing applied over a time interval to address market manipulation or volatility. This prevents unnecessary liquidations during volatile market environments. Exchanges typically do not use the last traded price for risk management purposes because it is susceptible to market manipulation.

  • Index price: The price of the derivative contract's underlying index. Each exchange applies a unique methodology for calculating the index price, which typically involves weighting the prices from spot markets from multiple different exchanges.

  • Estimated settlement price: An estimate of the settlement price if the contract were to be immediately settleed. Each exchange applies a unique methodology for calculating the final settlement price, which typically involves an average of the index price over some interval. The estimated settlement price applies this methodology continuously in real-time. The estimated settlement price can be helpful in hedging or calculating estimated profit and loss prior to contract expiration.

API Endpoints

Market contract prices can be accessed using the timeseries/market-contract-prices endpoint.

curl --compressed "https://api.coinmetrics.io/v4/timeseries/market-contract-prices?markets=deribit-ETH-25MAR22-1200-P-option&limit_per_market=1&api_key=<your_key>"
import requests
response = requests.get('https://api.coinmetrics.io/v4/timeseries/market-contract-prices?markets=deribit-ETH-25MAR22-1200-P-option&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_contract_prices(
        markets=["deribit-ETH-25MAR22-1200-P-option"], limit_per_market=5
    ).to_dataframe()
)

Example

{
  "data" : [ {
    "market" : "deribit-BTC-11NOV22-20000-C-option",
    "time" : "2022-10-20T08:03:00.000000000Z",
    "database_time" : "2022-10-20T08:03:52.831102000Z",
    "mark_price" : "0.0791",
    "index_price" : "19153.67",
    "settlement_price_estimated" : "19153.67",
    "exchange_time" : "2022-10-20T08:03:51.768000000Z"
  }, {
    "market" : "deribit-BTC-11NOV22-20000-C-option",
    "time" : "2022-10-20T08:04:00.000000000Z",
    "database_time" : "2022-10-20T08:04:15.834472000Z",
    "mark_price" : "0.0791",
    "index_price" : "19154.68",
    "settlement_price_estimated" : "19154.68",
    "exchange_time" : "2022-10-20T08:04:14.938000000Z"
  } ]
}
  • market: The id of the market. Market ids use the following naming convention for options markets: exchangeName-optionsSymbol-option

  • time: The time at which Coin Metrics queried the contract price from an exchange in ISO 8601 date-time format. Always with nanoseconds precision.

  • mark_price: The instrument market price, which represents the contract's fair market value and is used to calculate a trader's unrealized profit and losses and to trigger liquidations for risk management purposes.

  • index_price: The price of the underlying benchmark index.

  • settlement_price_estimated: Represents what the underlying index settlement price would be if the contract immediately expired.

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

  • exchange_time: The timestamp reported by the exchange. Can be null if the exchange does not report a timestamp.

Release History

A sample of contract price data from our API endpoint is shown below for the deribit-ETH-25MAR22-1200-P-option market.

: We expanded our options coverage to include several new data types, including market contract prices, from Deribit and added several new API endpoints to serve this data.

: Began collecting and serving the settlement price and estimated settlement price for option markets. The settlement price is served in our /catalog/markets endpoint and is available shortly after an option market expires. And the estimated settlement price is updated once a minute and served in our /timeseries/market-contract-prices endpoint.

/timeseries/market-contract-prices
CM MDF v2.5 on November 22, 2021
CM MDF v2.7 on October 24, 2022

Market contract prices

get

Returns contract prices for specified markets. This includes index price and mark price that are used by the exchange for settlement and risk management purposes. Results are ordered by tuple (market, time). To fetch the next page of results use next_page_url JSON response field.

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
granularitystring · enumOptional

Downsampling granularity of market contract prices. Supported values are raw, 1m, 1h, and 1d.

Default: rawPossible values:
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 contract prices.
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-contract-prices HTTP/1.1
Host: api.coinmetrics.io
Accept: */*
{
  "data": [
    {
      "market": "deribit-ETH-25MAR22-1200-P-option",
      "time": "2021-09-01T13:24:00.000000000Z",
      "mark_price": "0.02126",
      "index_price": "3529.34",
      "database_time": "2021-09-01T13:24:41.266168000Z",
      "exchange_time": "2021-09-01T13:24:00.000000000Z"
    }
  ],
  "next_page_token": "0.MjAyMC0wNi0wOFQyMDo0NTowMFo",
  "next_page_url": "https://api.coinmetrics.io/v4/timeseries/market-contract-prices?markets=deribit-ETH-10SEP21-3200-P-option&api_key=<your_key>&pretty=true&page_size=2&next_page_token=0.MjAyMC0wNi0wOFQyMDo0NTowMFo"
}
  • Definition
  • Details
  • API Endpoints
  • GETMarket contract prices
  • Example
  • Release History