glassnode 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/errors.rb +34 -0
- data/lib/glassnode.rb +11 -0
- data/lib/rest/rest_client.rb +39 -0
- data/lib/rest/v1/addresses.rb +356 -0
- data/lib/rest/v1/assets.rb +10 -0
- data/lib/rest/v1/blockchain.rb +167 -0
- data/lib/rest/v1/defi.rb +14 -0
- data/lib/rest/v1/derivatives.rb +388 -0
- data/lib/rest/v1/distribution.rb +144 -0
- data/lib/rest/v1/entities.rb +167 -0
- data/lib/rest/v1/eth2.rb +77 -0
- data/lib/rest/v1/fees.rb +149 -0
- data/lib/rest/v1/indicators.rb +896 -0
- data/lib/rest/v1/institutions.rb +293 -0
- data/lib/rest/v1/lightning.rb +95 -0
- data/lib/rest/v1/market.rb +140 -0
- data/lib/rest/v1/mempool.rb +95 -0
- data/lib/rest/v1/mining.rb +95 -0
- data/lib/rest/v1/protocols.rb +32 -0
- data/lib/rest/v1/supply.rb +437 -0
- data/lib/rest/v1/transactions.rb +496 -0
- data/lib/rest/v1.rb +66 -0
- data/lib/rest/v2/endpoints.rb +10 -0
- data/lib/rest/v2.rb +33 -0
- metadata +227 -0
data/lib/rest/v1/eth2.rb
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
module Glassnode
|
2
|
+
module RESTv1Eth2
|
3
|
+
|
4
|
+
#Tier: 1
|
5
|
+
#Params
|
6
|
+
# a: asset symbol
|
7
|
+
# c: ["NATIVE"]
|
8
|
+
# i: ["1h", "24h"]
|
9
|
+
def staking_deposits_count(params={})
|
10
|
+
authenticated_get("metrics/eth2/staking_deposits_count", params: params).body
|
11
|
+
end
|
12
|
+
|
13
|
+
#Tier: 1
|
14
|
+
#Params
|
15
|
+
# a: asset symbol
|
16
|
+
# c: ["NATIVE"]
|
17
|
+
# i: ["1h", "24h"]
|
18
|
+
def staking_validators_count(params={})
|
19
|
+
authenticated_get("metrics/eth2/staking_validators_count", params: params).body
|
20
|
+
end
|
21
|
+
|
22
|
+
#Tier: 1
|
23
|
+
#Params
|
24
|
+
# a: asset symbol
|
25
|
+
# c: ["NATIVE"]
|
26
|
+
# i: ["1h", "24h"]
|
27
|
+
def staking_total_deposits_count(params={})
|
28
|
+
authenticated_get("metrics/eth2/staking_total_deposits_count", params: params).body
|
29
|
+
end
|
30
|
+
|
31
|
+
#Tier: 1
|
32
|
+
#Params
|
33
|
+
# a: asset symbol
|
34
|
+
# c: ["NATIVE"]
|
35
|
+
# i: ["1h", "24h"]
|
36
|
+
def staking_total_validators_count(params={})
|
37
|
+
authenticated_get("metrics/eth2/staking_total_validators_count", params: params).body
|
38
|
+
end
|
39
|
+
|
40
|
+
#Tier: 1
|
41
|
+
#Params
|
42
|
+
# a: asset symbol
|
43
|
+
# c: ["NATIVE"]
|
44
|
+
# i: ["1h", "24h"]
|
45
|
+
def staking_phase_0_goal_percent(params={})
|
46
|
+
authenticated_get("metrics/eth2/staking_phase_0_goal_percent", params: params).body
|
47
|
+
end
|
48
|
+
|
49
|
+
#Tier: 2
|
50
|
+
#Params
|
51
|
+
# a: asset symbol
|
52
|
+
# c: ["NATIVE", "USD"]
|
53
|
+
# i: ["1h", "24h"]
|
54
|
+
def staking_volume_sum(params={})
|
55
|
+
authenticated_get("metrics/eth2/staking_volume_sum", params: params).body
|
56
|
+
end
|
57
|
+
|
58
|
+
#Tier: 2
|
59
|
+
#Params
|
60
|
+
# a: asset symbol
|
61
|
+
# c: ["NATIVE", "USD"]
|
62
|
+
# i: ["1h", "24h"]
|
63
|
+
def staking_total_volume_sum(params={})
|
64
|
+
authenticated_get("metrics/eth2/staking_total_volume_sum", params: params).body
|
65
|
+
end
|
66
|
+
|
67
|
+
#Tier: 2
|
68
|
+
#Params
|
69
|
+
# a: asset symbol
|
70
|
+
# c: ["NATIVE", "USD"]
|
71
|
+
# i: ["24h"]
|
72
|
+
def deposited_by_provider_volume_sum(params={})
|
73
|
+
authenticated_get("metrics/eth2/deposited_by_provider_volume_sum", params: params).body
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
end
|
data/lib/rest/v1/fees.rb
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
module Glassnode
|
2
|
+
module RESTv1Fees
|
3
|
+
|
4
|
+
#Tier: 1
|
5
|
+
#Params
|
6
|
+
# a: asset symbol
|
7
|
+
# c: ["NATIVE"]
|
8
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
9
|
+
def gas_used_sum(params={})
|
10
|
+
authenticated_get("metrics/fees/gas_used_sum", params: params).body
|
11
|
+
end
|
12
|
+
|
13
|
+
#Tier: 1
|
14
|
+
#Params
|
15
|
+
# a: asset symbol
|
16
|
+
# c: ["NATIVE"]
|
17
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
18
|
+
def gas_used_mean(params={})
|
19
|
+
authenticated_get("metrics/fees/gas_used_mean", params: params).body
|
20
|
+
end
|
21
|
+
|
22
|
+
#Tier: 1
|
23
|
+
#Params
|
24
|
+
# a: asset symbol
|
25
|
+
# c: ["NATIVE"]
|
26
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
27
|
+
def gas_used_median(params={})
|
28
|
+
authenticated_get("metrics/fees/gas_used_median", params: params).body
|
29
|
+
end
|
30
|
+
|
31
|
+
#Tier: 1
|
32
|
+
#Params
|
33
|
+
# a: asset symbol
|
34
|
+
# c: ["NATIVE"]
|
35
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
36
|
+
def gas_limit_tx_mean(params={})
|
37
|
+
authenticated_get("metrics/fees/gas_limit_tx_mean", params: params).body
|
38
|
+
end
|
39
|
+
|
40
|
+
#Tier: 1
|
41
|
+
#Params
|
42
|
+
# a: asset symbol
|
43
|
+
# c: ["NATIVE"]
|
44
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
45
|
+
def gas_limit_tx_median(params={})
|
46
|
+
authenticated_get("metrics/fees/gas_limit_tx_median", params: params).body
|
47
|
+
end
|
48
|
+
|
49
|
+
#Tier: 1
|
50
|
+
#Params
|
51
|
+
# a: asset symbol
|
52
|
+
# c: ["NATIVE", "USD"]
|
53
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
54
|
+
def gas_price_mean(params={})
|
55
|
+
authenticated_get("metrics/fees/gas_price_mean", params: params).body
|
56
|
+
end
|
57
|
+
|
58
|
+
#Tier: 1
|
59
|
+
#Params
|
60
|
+
# a: asset symbol
|
61
|
+
# c: ["NATIVE", "USD"]
|
62
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
63
|
+
def gas_price_median(params={})
|
64
|
+
authenticated_get("metrics/fees/gas_price_median", params: params).body
|
65
|
+
end
|
66
|
+
|
67
|
+
#Tier: 1
|
68
|
+
#Params
|
69
|
+
# a: asset symbol
|
70
|
+
# c: ["NATIVE", "USD"]
|
71
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
72
|
+
def volume_sum(params={})
|
73
|
+
authenticated_get("metrics/fees/volume_sum", params: params).body
|
74
|
+
end
|
75
|
+
|
76
|
+
#Tier: 1
|
77
|
+
#Params
|
78
|
+
# a: asset symbol
|
79
|
+
# c: ["NATIVE", "USD"]
|
80
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
81
|
+
def volume_mean(params={})
|
82
|
+
authenticated_get("metrics/fees/volume_mean", params: params).body
|
83
|
+
end
|
84
|
+
|
85
|
+
#Tier: 1
|
86
|
+
#Params
|
87
|
+
# a: asset symbol
|
88
|
+
# c: ["NATIVE", "USD"]
|
89
|
+
# i: ["1h", "24h", "10m", "1w", "1month"]
|
90
|
+
def volume_median(params={})
|
91
|
+
authenticated_get("metrics/fees/volume_median", params: params).body
|
92
|
+
end
|
93
|
+
|
94
|
+
#Tier: 2
|
95
|
+
#Params
|
96
|
+
# a: asset symbol
|
97
|
+
# c: ["NATIVE"]
|
98
|
+
# i: ["10m", "1h", "24h"]
|
99
|
+
def fee_ratio_multiple(params={})
|
100
|
+
authenticated_get("metrics/fees/fee_ratio_multiple", params: params).body
|
101
|
+
end
|
102
|
+
|
103
|
+
#Tier: 3
|
104
|
+
#Params
|
105
|
+
# a: asset symbol
|
106
|
+
# c: ["NATIVE"]
|
107
|
+
# i: ["1h", "24h"]
|
108
|
+
def exchanges_relative(params={})
|
109
|
+
authenticated_get("metrics/fees/exchanges_relative", params: params).body
|
110
|
+
end
|
111
|
+
|
112
|
+
#Tier: 3
|
113
|
+
#Params
|
114
|
+
# a: asset symbol
|
115
|
+
# c: ["NATIVE", "USD"]
|
116
|
+
# i: ["1h", "24h"]
|
117
|
+
def exchanges_sum(params={})
|
118
|
+
authenticated_get("metrics/fees/exchanges_sum", params: params).body
|
119
|
+
end
|
120
|
+
|
121
|
+
#Tier: 3
|
122
|
+
#Params
|
123
|
+
# a: asset symbol
|
124
|
+
# c: ["NATIVE", "USD"]
|
125
|
+
# i: ["1h", "24h"]
|
126
|
+
def exchanges_mean(params={})
|
127
|
+
authenticated_get("metrics/fees/exchanges_mean", params: params).body
|
128
|
+
end
|
129
|
+
|
130
|
+
#Tier: 3
|
131
|
+
#Params
|
132
|
+
# a: asset symbol
|
133
|
+
# c: ["NATIVE"]
|
134
|
+
# i: ["24h"]
|
135
|
+
def tx_types_breakdown_sum(params={})
|
136
|
+
authenticated_get("metrics/fees/tx_types_breakdown_sum", params: params).body
|
137
|
+
end
|
138
|
+
|
139
|
+
#Tier: 3
|
140
|
+
#Params
|
141
|
+
# a: asset symbol
|
142
|
+
# c: ["NATIVE"]
|
143
|
+
# i: ["24h"]
|
144
|
+
def tx_types_breakdown_relative(params={})
|
145
|
+
authenticated_get("metrics/fees/tx_types_breakdown_relative", params: params).body
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
149
|
+
end
|