Code Monkey home page Code Monkey logo

deribit_flows_heatmap's Introduction

Deribit Block Option Trade Heatmap Tracker

This Python script visualizes the flow of block option trades on Deribit for BTC or ETH using a heatmap. It fetches historical trade data, processes it, and generates a heatmap to analyze trade flows based on maturity and strike prices.

Usage

  1. Initialization: Create an instance of the HeatMap class.
from option_flows import HeatMap
heatmap = HeatMap(asset='BTC', lookback_hours=24)
  • asset: The cryptocurrency asset, either 'BTC' or 'ETH'.
  • lookback_hours: The number of hours to look back for trades.
  1. Generating the Heatmap:
heatmap.plot_data()

This method fetches the data, cleans it, and plots the heatmap. The heatmap shows option trade flows with maturity dates on the y-axis and strike prices on the x-axis. The blue vertical line represents the strike closest to the current price of the asset. Lastly, the script saves a heatmap image visualizing the trade flows during the specified lookback period.

Examples

Example 1: Bitcoin 24-Hour Trade Flow

btc_heatmap = HeatMap(asset='BTC', lookback_hours=24)
btc_heatmap.plot_data()

Generates and saves a heatmap for Bitcoin option block trades over the past 24 hours.

Example 2: Ethereum 48-Hour Trade Flow

eth_heatmap = HeatMap(asset='ETH', lookback_hours=12)
eth_heatmap.plot_data()

Generates and saves a heatmap for Ethereum option block trades over the past 12 hours.

Dependencies

To use the HeatMap class, ensure you have the following Python libraries installed. You can install all required dependencies via pip with this command:

pip install pandas numpy requests matplotlib seaborn

Conclusion

This script provides an insightful visualization of the block option trades on Deribit for BTC and ETH, aiding in the analysis of market trends and trader behavior.

deribit_flows_heatmap's People

Contributors

schepal avatar

Stargazers

 avatar obbbychai avatar Rex Fan avatar  avatar stark4 avatar  avatar  avatar Brayden Tang avatar  avatar fri tol avatar

Watchers

 avatar

Forkers

cque7

deribit_flows_heatmap's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.