Created
March 22, 2023 16:16
-
-
Save gallynaut/fec625de5c47a7cbc77ce5653ca2e48c to your computer and use it in GitHub Desktop.
Deribit IV 1Day
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Deribit BTC IV - 1D", | |
"tasks": [ | |
{ | |
"cacheTask": { | |
"cacheItems": [ | |
{ | |
"variableName": "ENDING_TIMESTAMP", | |
"job": { | |
"tasks": [ | |
{ | |
"cronParseTask": { | |
/* Current Timestamp */ | |
"cronPattern": "* * * * * *", | |
"clockOffset": 0, | |
/* Node Clock */ | |
"clock": 0 | |
} | |
}, | |
{ | |
"multiplyTask": { | |
"big": "1000" | |
} | |
} | |
] | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"cacheTask": { | |
"cacheItems": [ | |
{ | |
"variableName": "STARTING_TIMESTAMP", | |
"job": { | |
"tasks": [ | |
{ | |
"valueTask": { | |
"big": "${ENDING_TIMESTAMP}" | |
} | |
}, | |
{ | |
"subtractTask": { | |
/* 1 D in ms */ | |
"big": "86400000" | |
} | |
} | |
] | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"meanTask": { | |
"jobs": [ | |
{ | |
"tasks": [ | |
{ | |
"httpTask": { | |
"url": "https://www.deribit.com/api/v2/public/get_volatility_index_data?currency=BTC&end_timestamp=${ENDING_TIMESTAMP}&resolution=3600&start_timestamp=${STARTING_TIMESTAMP}" | |
} | |
}, | |
{ | |
"jsonParseTask": { | |
"path": "$.result.data.*.4", | |
"aggregationMethod": 4 | |
} | |
} | |
] | |
} | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment