Coin Metrics Python API Client Updates

We’re constantly working to make the Coin Metrics Python API Client faster, more powerful, and easier to use. We highly recommend updating to the latest version, which you can always find on PyPi, to take advantage of these improvements and to ensure you’re  getting the best performance. Here’s everything you need to know about the latest enhancements over the past 6 months:

  • Reorganized Python API Client documentation: https://coinmetrics.github.io/api-client-python/site/index.html
  • Coverage of API endpoints is up-to-date (with the exception of the jobs and blockchain-job endpoints)
  • Added Polars functionality. Polars dataframes can be transformed using CoinMetricsClient.get_<…>().to_dataframe(dataframe_type=”polars”)  and LazyFrames using CoinMetricsClient.get_<…>.to_lazyframe(). Note that the default behavior is still pandas and this feature is experimental. If running into issues, try .to_dataframe(dataframe_type=”polars”, optimize_dtypes=False). See our Polars section of the documentation for more.
  • Faster catalog-v2 and reference-data calls. This is done by changing the default format value from json to json-stream. Note that page_size is ignored, but performance should still be much faster than page_size=10000&format=json
  • Catalog-V2 dataframes are now easier to work with. Data is automatically flattened when calling catalog_*_v2.to_dataframe() .
  • More reliability in getting all data returned in reference-data calls.
  • Parallelization is more flexible. Users can parallelize on more variables, on height increments ( e.g. .parallel(height_increment=10)).) , and use more datatypes for time_increment  (e.g. pd.DateOffset)

 

This tool is always evolving, and we’d love to hear your thoughts! If you have feedback or suggestions, reach out!

Stay Ahead with Coin Metrics

Coin Metrics continues to enhance its market intelligence offerings with best-in-class blockchain data and analytics. Stay updated on new data releases and insights:

Coin Metrics Announcements

State of the Network

X (Formerly Twitter)

LinkedIn

More

LinkedIn
X.com
Telegram
Email