-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtick.py
More file actions
36 lines (33 loc) · 942 Bytes
/
tick.py
File metadata and controls
36 lines (33 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class Tick:
"""
A class to represent a Tick on the price space of a Uniswap v3 pool.
...
Attributes
----------
idx : int
The index of the Tick
liquidity : float
The liquidity at this Tick
"""
def __init__(
self,
idx: int,
liquidity_net: float,
liquidity_gross: float,
fee_growth_outside_x: float,
fee_growth_outside_y: float
) -> None:
"""
Constructs all the necessary attributes for the Tick object.
Parameters
----------
idx : int
The index of the Tick
liquidity : float
The liquidity at this Tick
"""
self.idx = idx
self.liquidity_net = liquidity_net
self.liquidity_gross = liquidity_gross
self.fee_growth_outside_x = fee_growth_outside_x
self.fee_growth_outside_y = fee_growth_outside_y