Skip to content

The deribit_historical_trades repository gathers cryptocurrency (BTC, ETH, SOL, USDC) derivatives traded on the cryptocurrency derivative platform Deribit.

Notifications You must be signed in to change notification settings

BarendPotijk/deribit_historical_trades

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation


Logo

Historical Crypto trades

Gather Cryptocurrency derivative trades using Deribit API v2
Explore the docs »

See code

Project description

The deribit_historical_trades repository gathers cryptocurrency (BTC, ETH, SOL, USDC) derivatives traded on the cryptocurrency derivative platform Deribit. All crypto derivatives trades since the start of the platform are publicly available in the Deribit API v2.1.1 under 'https://history.deribit.com/api/v2/public/get_last_trades_by_currency' using REST requests. For further information and the documentations see https://docs.deribit.com/#public-get_last_trades_by_currency_and_time.

Getting Started

To use this script, you will need to have Python 3 and the following libraries installed:

  • json
  • requests
  • pandas
  • datetime

Running the Script

  1. Open the script (Deribit_derivative_data.py) in your preferred Python editor.

  2. Ensure that the required libraries are installed.

  3. Set the query parameters for the API endpoint in the function derivative_data():

    derivative_data(currency, start_date, end_date, kind = 'any', count = 10000) 
  4. Run the script.

Parameters

Parameter Required Type Enum Description
currency true string BTC
ETH
SOL
USDC
The currency symbol
start_date true datetime object The earliest datetime object to return result for
end_date true datetime object The most recent datetime object to return result for
kind false string future
option
future_combo
option_combo
combo
any
Instrument kind, combo for any combo or any for all. If not provided instruments of all kinds are considered
count false integer Number of requested items, default - 10000

Contributing

If you find a bug or would like to suggest an enhancement, please create an issue or submit a pull request. We welcome any contributions or feedback to make this script more useful and user-friendly for the cryptocurrency community.

About

The deribit_historical_trades repository gathers cryptocurrency (BTC, ETH, SOL, USDC) derivatives traded on the cryptocurrency derivative platform Deribit.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages