Loading...

Plus+ Python

Use Python to Query the DeriBit API & Save All Product Details to CSV

Use Python to Query the DeriBit API & Save All Product Details to CSV
When people think of cryptocurrencies, most of the time they are thinking about the spot assets. But as popularity has soared over recent years, new derivatives are available for trading across multiple exchanges. DeriBit is an exchange that has spot, futures, and options trading of cryptocurrencies! Futures trading includes both Perpetual (no maturity date) and quarterly futures expiries. There are more than 1200+ options that are currently live on their platform. We have written the below code to pull all available instruments at DeriBit for USDC, BTC, and ETH products; and then save the results to a CSV file. Our code has every line commented, so you always know how to edit or understand what is being done!

These are some of the product details that are available and will be captured in this process: Tick size, taker commission, strike (if option), settlement period (month, day or week), the settlement currency (USDC, BTC, or ETH), the derivative's price index, and many more. The script is only 50 lines of code long, and includes extra line spaces for readability (so its actually even shorter!)

Plus+ membership required

Create a Plus+ account to view the live codebase.

This article has a fully working, notebook-ready code block. Sign up for Plus+ to access it and the rest of the 20+ premium articles.

Subscribe to Plus+ Browse Plus+ articles