Skip to content

Commit

Permalink
gamma levels with currency
Browse files Browse the repository at this point in the history
  • Loading branch information
GravitySucks committed Jul 27, 2022
1 parent dc22a05 commit c2907c6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions gvol/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,3 +1321,24 @@ def options_gvol_direction(
variable_values={"dateStart":dateStart, "dateEnd":dateEnd},
)

def options_gvol_gex(
self, symbol: types.BTCOrETHEnumType
) -> Dict:
"""This endpoint returns the gamma levels (in nr of contracts for 1$ move in the underlying) of Market Makers according to a proprietary gvol algorithm.
Inventory of dealers are estimated using the gvol_direction of each trade and analyzing the live orderbook
at millisecond level.
Args:
{
"symbol": "BTC"
}
Returns:
"currency": "BTC",
"date": "1658908800000",
"expiration": "1658995200000",
"strike": 18000,
"gammaLevel": 0
"""
return self._client.execute(
gql(queries.options_gvol_gex),
variable_values={"symbol": symbol},
)
21 changes: 21 additions & 0 deletions gvol/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,27 @@
}
"""

options_gvol_gex = """
query GammaLevelsExpiration($symbol:BTCOrETHEnumType){
GammaLevelsExpiration: GammaLevelsExpiration(symbol:$symbol) {
currency
date
expiration
strike
gammaLevel
}
}
"""











##ADDED AGAIN ON CUSTOMER'S REQUESTS

Expand Down

0 comments on commit c2907c6

Please sign in to comment.