Deribit¶
Fetch market and static data from Deribit API.
You can import the module via
quantflow.data.deribit.Deribit
dataclass
¶
Bases: AioHttpClient
Deribit API client
Example¶
get_book_summary_by_instrument
async
¶
Get the book summary for a given instrument.
| PARAMETER | DESCRIPTION |
|---|---|
instrument_name
|
Instrument name
TYPE:
|
Source code in quantflow/data/deribit.py
get_book_summary_by_currency
async
¶
Get the book summary for a given currency.
For linear futures/options, the currency parameter should be set to "usdc"
and the base parameter should be set to the underlying
currency (e.g. "btc" or "eth").
| PARAMETER | DESCRIPTION |
|---|---|
currency
|
Currency
TYPE:
|
kind
|
Optional instrument kind
TYPE:
|
base
|
Optional base currency for linear futures/options
TYPE:
|
Source code in quantflow/data/deribit.py
get_instruments
async
¶
Get the list of instruments for a given currency.
| PARAMETER | DESCRIPTION |
|---|---|
currency
|
Currency
TYPE:
|
kind
|
Optional instrument kind
TYPE:
|
expired
|
Include expired instruments
TYPE:
|
base
|
Optional base currency for linear futures/options
TYPE:
|
Source code in quantflow/data/deribit.py
get_volatility
async
¶
Provides information about historical volatility for given cryptocurrency
| PARAMETER | DESCRIPTION |
|---|---|
currency
|
Currency
TYPE:
|
Source code in quantflow/data/deribit.py
volatility_surface_loader
async
¶
volatility_surface_loader(
currency,
*,
ref_date=None,
inverse=True,
exclude_open_interest=None,
exclude_volume=None
)
Create a VolSurfaceLoader for a given crypto-currency by fetching the book summaries and instrument definitions and passing them to loader_from_book
| PARAMETER | DESCRIPTION |
|---|---|
currency
|
Currency
TYPE:
|
ref_date
|
Reference date for the yield curves; defaults to now
TYPE:
|
inverse
|
Whether to use inverse or linear options. Inverse options are priced in the base currency, while linear options are priced in USD.
TYPE:
|
exclude_open_interest
|
Exclude options with open interest below this threshold
TYPE:
|
exclude_volume
|
Exclude options with volume below this threshold
TYPE:
|
Source code in quantflow/data/deribit.py
loader_from_book
classmethod
¶
loader_from_book(
futures,
options,
instruments,
*,
currency,
ref_date=None,
inverse=True,
exclude_open_interest=None,
exclude_volume=None
)
Build a VolSurfaceLoader from Deribit book summaries and instrument definitions.
Useful for rebuilding a loader from recorded data without network access.
| PARAMETER | DESCRIPTION |
|---|---|
futures
|
Futures book summary entries
TYPE:
|
options
|
Options book summary entries
TYPE:
|
instruments
|
Instrument definitions
TYPE:
|
currency
|
Currency
TYPE:
|
ref_date
|
Reference date for the yield curves; defaults to now
TYPE:
|
inverse
|
Whether to use inverse or linear options. Inverse options are priced in the base currency, while linear options are priced in USD.
TYPE:
|
exclude_open_interest
|
Exclude options with open interest below this threshold
TYPE:
|
exclude_volume
|
Exclude options with volume below this threshold
TYPE:
|
Source code in quantflow/data/deribit.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
get_path
async
¶
to_result
async
¶
| PARAMETER | DESCRIPTION |
|---|---|
response
|
HTTP response object
TYPE:
|
Source code in quantflow/data/deribit.py
to_df
async
¶
| PARAMETER | DESCRIPTION |
|---|---|
response
|
HTTP response object
TYPE:
|