Skip to main content
Since Tether’s launch in 2014, stablecoins have grown to become one of the most dominant sectors in the world of digital assets. Many considered them to be crypto’s “killer app,” providing global access to stable savings and payment rails beyond the rigid confines of the traditional banking system. In this walkthrough, we use Coin Metrics Market Data Feed and CM Prices to explore the various venues where these assets are traded, and examine various pricing methodologies that allow us to better understand how they perform in comparison to the underlying fiat currencies.

Resources

This notebook demonstrates basic functionality offered by the Coin Metrics Python API Client and Market Data Feed. Coin Metrics offers a vast assortment of data for hundreds of cryptoassets. The Python API Client allows for easy access to this data using Python without needing to create your own wrappers using requests and other such libraries. To understand the data that Coin Metrics offers, feel free to peruse the resources below.

File Download

Download the entire notebook as either a jupyter notebook to run yourself or as a pdf from the two links below MDF_stablecoin_prices.ipynb MDF_stablecoin_prices.pdf

Notebook Setup

Get Stablecoin Markets

The catalog/markets endpoint returns a list of available markets along with time ranges of available data. Users can pass in a list of markets, exchanges, or market types (spot, futures, options). We can retrieve our stablecoin markets by fetching a list of all ‘spot’ markets, then filtering for the markets where the ‘base’ or ‘quote’ parameter is equivalent to our stablecoin of interest.
19949 rows × 5 columns

Get stablecoin prices

Single market trades

Trades are one of the foundational data types we collect from exchanges. From raw trades data, we can construct additional aggregated metrics.
100 rows × 7 columns

Single market candles

From raw trades data, we construct OHLC candles for each market. Candles include the following data types:
  • price_open: The opening price of the candle.
  • price_high: The high price of the candle.
  • price_low: The low price of the candle.
  • price_close: The close price of the candle.
  • vwap: The volume-weighted average price of the candle.
  • volume: The volume of the candle in units of the base asset.
  • candle_usd_volume: The volume of the candle in units of U.S. dollars.
  • candle_trades_count: The number of trades in the candle interval.
1248 rows × 10 columns

Reference Rate Candles

We offer reference rates quoted in USD, Euro, Bitcoin, and Ethereum. We now support these quote currencies for our entire reference rates coverage universe of over 500 assets and for all of our frequencies, including 1s, 1m, 1h, 1d-ny-close and 1d. Current composition of markets for USDT-USD Reference Rate pair (as of May 17, 2023):
  • “coinbase-usdt-usd-spot”,
  • “coinbase-eth-usdt-spot”,
  • “coinbase-btc-usdt-spot”,
  • “kraken-usdt-usd-spot”,
  • “binance-btc-usdt-spot”,
  • “binance-eth-usdt-spot”,
  • “crypto.com-usdt-usd-spot”

Reference Rate

1740 rows × 3 columns

Principal Market Price

The Principal Market Prices identify a principal market for each asset and utilize the most recent price from this market. Common use cases are for fair value measurement, preparing financial statements, and calculating closing prices for indexes or financial benchmarks.
1740 rows × 4 columns