brk-client 0.1.0a6__py3-none-any.whl → 0.1.2__py3-none-any.whl
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.
brk_client/__init__.py
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
# Auto-generated BRK Python client
|
|
2
2
|
# Do not edit manually
|
|
3
3
|
|
|
4
|
-
from
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
from typing import TypeVar, Generic, Any, Optional, List, Literal, TypedDict, Union, Protocol, overload, Iterator, Tuple, TYPE_CHECKING
|
|
5
7
|
from http.client import HTTPSConnection, HTTPConnection
|
|
6
8
|
from urllib.parse import urlparse
|
|
9
|
+
from datetime import date, timedelta
|
|
7
10
|
import json
|
|
8
11
|
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
import pandas as pd # type: ignore[import-not-found]
|
|
14
|
+
import polars as pl # type: ignore[import-not-found]
|
|
15
|
+
|
|
9
16
|
T = TypeVar('T')
|
|
10
17
|
|
|
11
18
|
# Type definitions
|
|
@@ -69,8 +76,6 @@ MonthIndex = int
|
|
|
69
76
|
# Opening price value for a time period
|
|
70
77
|
Open = Cents
|
|
71
78
|
OpReturnIndex = TypeIndex
|
|
72
|
-
OracleBins = List[int]
|
|
73
|
-
OracleBinsV2 = List[int]
|
|
74
79
|
OutPoint = int
|
|
75
80
|
# Type (P2PKH, P2WPKH, P2SH, P2TR, etc.)
|
|
76
81
|
OutputType = Literal["p2pk65", "p2pk33", "p2pkh", "p2ms", "p2sh", "opreturn", "p2wpkh", "p2wsh", "p2tr", "p2a", "empty", "unknown"]
|
|
@@ -96,23 +101,27 @@ P2WPKHAddressIndex = TypeIndex
|
|
|
96
101
|
P2WPKHBytes = U8x20
|
|
97
102
|
P2WSHAddressIndex = TypeIndex
|
|
98
103
|
P2WSHBytes = U8x32
|
|
99
|
-
# Index for 2-output transactions (oracle pair candidates)
|
|
100
|
-
#
|
|
101
|
-
# This indexes all transactions with exactly 2 outputs, which are
|
|
102
|
-
# candidates for the UTXOracle algorithm (payment + change pattern).
|
|
103
|
-
PairOutputIndex = int
|
|
104
104
|
PoolSlug = Literal["unknown", "blockfills", "ultimuspool", "terrapool", "luxor", "onethash", "btccom", "bitfarms", "huobipool", "wayicn", "canoepool", "btctop", "bitcoincom", "pool175btc", "gbminers", "axbt", "asicminer", "bitminter", "bitcoinrussia", "btcserv", "simplecoinus", "btcguild", "eligius", "ozcoin", "eclipsemc", "maxbtc", "triplemining", "coinlab", "pool50btc", "ghashio", "stminingcorp", "bitparking", "mmpool", "polmine", "kncminer", "bitalo", "f2pool", "hhtt", "megabigpower", "mtred", "nmcbit", "yourbtcnet", "givemecoins", "braiinspool", "antpool", "multicoinco", "bcpoolio", "cointerra", "kanopool", "solock", "ckpool", "nicehash", "bitclub", "bitcoinaffiliatenetwork", "btcc", "bwpool", "exxbw", "bitsolo", "bitfury", "twentyoneinc", "digitalbtc", "eightbaochi", "mybtccoinpool", "tbdice", "hashpool", "nexious", "bravomining", "hotpool", "okexpool", "bcmonster", "onehash", "bixin", "tatmaspool", "viabtc", "connectbtc", "batpool", "waterhole", "dcexploration", "dcex", "btpool", "fiftyeightcoin", "bitcoinindia", "shawnp0wers", "phashio", "rigpool", "haozhuzhu", "sevenpool", "miningkings", "hashbx", "dpool", "rawpool", "haominer", "helix", "bitcoinukraine", "poolin", "secretsuperstar", "tigerpoolnet", "sigmapoolcom", "okpooltop", "hummerpool", "tangpool", "bytepool", "spiderpool", "novablock", "miningcity", "binancepool", "minerium", "lubiancom", "okkong", "aaopool", "emcdpool", "foundryusa", "sbicrypto", "arkpool", "purebtccom", "marapool", "kucoinpool", "entrustcharitypool", "okminer", "titan", "pegapool", "btcnuggets", "cloudhashing", "digitalxmintsy", "telco214", "btcpoolparty", "multipool", "transactioncoinmining", "btcdig", "trickysbtcpool", "btcmp", "eobot", "unomp", "patels", "gogreenlight", "ekanembtc", "canoe", "tiger", "onem1x", "zulupool", "secpool", "ocean", "whitepool", "wk057", "futurebitapollosolo", "carbonnegative", "portlandhodl", "phoenix", "neopool", "maxipool", "bitfufupool", "luckypool", "miningdutch", "publicpool", "miningsquared", "innopolistech", "btclab", "parasite"]
|
|
105
105
|
QuarterIndex = int
|
|
106
106
|
# Transaction locktime
|
|
107
107
|
RawLockTime = int
|
|
108
|
+
# Fractional satoshis (f64) - for representing USD prices in sats
|
|
109
|
+
#
|
|
110
|
+
# Formula: `sats_fract = usd_value * 100_000_000 / btc_price`
|
|
111
|
+
#
|
|
112
|
+
# When BTC is $100,000:
|
|
113
|
+
# - $1 = 1,000 sats
|
|
114
|
+
# - $0.001 = 1 sat
|
|
115
|
+
# - $0.0001 = 0.1 sats (fractional)
|
|
116
|
+
SatsFract = float
|
|
108
117
|
SemesterIndex = int
|
|
109
|
-
# Fixed-size boolean value optimized for on-disk storage (stored as
|
|
118
|
+
# Fixed-size boolean value optimized for on-disk storage (stored as u8)
|
|
110
119
|
StoredBool = int
|
|
111
120
|
# Stored 32-bit floating point value
|
|
112
121
|
StoredF32 = float
|
|
113
122
|
# Fixed-size 64-bit floating point value optimized for on-disk storage
|
|
114
123
|
StoredF64 = float
|
|
115
|
-
|
|
124
|
+
StoredI8 = int
|
|
116
125
|
StoredU16 = int
|
|
117
126
|
# Fixed-size 32-bit unsigned integer optimized for on-disk storage
|
|
118
127
|
StoredU32 = int
|
|
@@ -1039,13 +1048,114 @@ def _p(prefix: str, acc: str) -> str:
|
|
|
1039
1048
|
return f"{prefix}_{acc}" if acc else prefix
|
|
1040
1049
|
|
|
1041
1050
|
|
|
1042
|
-
|
|
1051
|
+
# Date conversion constants
|
|
1052
|
+
_GENESIS = date(2009, 1, 3) # dateindex 0, weekindex 0
|
|
1053
|
+
_DAY_ONE = date(2009, 1, 9) # dateindex 1 (6 day gap after genesis)
|
|
1054
|
+
_DATE_INDEXES = frozenset(['dateindex', 'weekindex', 'monthindex', 'yearindex', 'quarterindex', 'semesterindex', 'decadeindex'])
|
|
1055
|
+
|
|
1056
|
+
def is_date_index(index: str) -> bool:
|
|
1057
|
+
"""Check if an index type is date-based."""
|
|
1058
|
+
return index in _DATE_INDEXES
|
|
1059
|
+
|
|
1060
|
+
def index_to_date(index: str, i: int) -> date:
|
|
1061
|
+
"""Convert an index value to a date for date-based indexes."""
|
|
1062
|
+
if index == 'dateindex':
|
|
1063
|
+
return _GENESIS if i == 0 else _DAY_ONE + timedelta(days=i - 1)
|
|
1064
|
+
elif index == 'weekindex':
|
|
1065
|
+
return _GENESIS + timedelta(weeks=i)
|
|
1066
|
+
elif index == 'monthindex':
|
|
1067
|
+
return date(2009 + i // 12, i % 12 + 1, 1)
|
|
1068
|
+
elif index == 'yearindex':
|
|
1069
|
+
return date(2009 + i, 1, 1)
|
|
1070
|
+
elif index == 'quarterindex':
|
|
1071
|
+
m = i * 3
|
|
1072
|
+
return date(2009 + m // 12, m % 12 + 1, 1)
|
|
1073
|
+
elif index == 'semesterindex':
|
|
1074
|
+
m = i * 6
|
|
1075
|
+
return date(2009 + m // 12, m % 12 + 1, 1)
|
|
1076
|
+
elif index == 'decadeindex':
|
|
1077
|
+
return date(2009 + i * 10, 1, 1)
|
|
1078
|
+
else:
|
|
1079
|
+
raise ValueError(f"{index} is not a date-based index")
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
@dataclass
|
|
1083
|
+
class MetricData(Generic[T]):
|
|
1043
1084
|
"""Metric data with range information."""
|
|
1085
|
+
version: int
|
|
1086
|
+
index: Index
|
|
1044
1087
|
total: int
|
|
1045
1088
|
start: int
|
|
1046
1089
|
end: int
|
|
1090
|
+
stamp: str
|
|
1047
1091
|
data: List[T]
|
|
1048
1092
|
|
|
1093
|
+
def dates(self) -> List[date]:
|
|
1094
|
+
"""Convert index range to dates. Only works for date-based indexes."""
|
|
1095
|
+
return [index_to_date(self.index, i) for i in range(self.start, self.end)]
|
|
1096
|
+
|
|
1097
|
+
def indexes(self) -> List[int]:
|
|
1098
|
+
"""Get index range as list."""
|
|
1099
|
+
return list(range(self.start, self.end))
|
|
1100
|
+
|
|
1101
|
+
def to_date_dict(self) -> dict[date, T]:
|
|
1102
|
+
"""Return data as {date: value} dict. Only works for date-based indexes."""
|
|
1103
|
+
return dict(zip(self.dates(), self.data))
|
|
1104
|
+
|
|
1105
|
+
def to_index_dict(self) -> dict[int, T]:
|
|
1106
|
+
"""Return data as {index: value} dict."""
|
|
1107
|
+
return dict(zip(range(self.start, self.end), self.data))
|
|
1108
|
+
|
|
1109
|
+
def date_items(self) -> List[Tuple[date, T]]:
|
|
1110
|
+
"""Return data as [(date, value), ...] pairs. Only works for date-based indexes."""
|
|
1111
|
+
return list(zip(self.dates(), self.data))
|
|
1112
|
+
|
|
1113
|
+
def index_items(self) -> List[Tuple[int, T]]:
|
|
1114
|
+
"""Return data as [(index, value), ...] pairs."""
|
|
1115
|
+
return list(zip(range(self.start, self.end), self.data))
|
|
1116
|
+
|
|
1117
|
+
def iter(self) -> Iterator[Tuple[int, T]]:
|
|
1118
|
+
"""Iterate over (index, value) pairs."""
|
|
1119
|
+
return iter(zip(range(self.start, self.end), self.data))
|
|
1120
|
+
|
|
1121
|
+
def iter_dates(self) -> Iterator[Tuple[date, T]]:
|
|
1122
|
+
"""Iterate over (date, value) pairs. Date-based indexes only."""
|
|
1123
|
+
return iter(zip(self.dates(), self.data))
|
|
1124
|
+
|
|
1125
|
+
def __iter__(self) -> Iterator[Tuple[int, T]]:
|
|
1126
|
+
"""Default iteration over (index, value) pairs."""
|
|
1127
|
+
return self.iter()
|
|
1128
|
+
|
|
1129
|
+
def to_polars(self, with_dates: bool = True) -> pl.DataFrame:
|
|
1130
|
+
"""Convert to Polars DataFrame. Requires polars to be installed.
|
|
1131
|
+
|
|
1132
|
+
Returns a DataFrame with columns:
|
|
1133
|
+
- 'date' (date) and 'value' (T) if with_dates=True and index is date-based
|
|
1134
|
+
- 'index' (int) and 'value' (T) otherwise
|
|
1135
|
+
"""
|
|
1136
|
+
try:
|
|
1137
|
+
import polars as pl # type: ignore[import-not-found]
|
|
1138
|
+
except ImportError:
|
|
1139
|
+
raise ImportError("polars is required: pip install polars")
|
|
1140
|
+
if with_dates and self.index in _DATE_INDEXES:
|
|
1141
|
+
return pl.DataFrame({"date": self.dates(), "value": self.data})
|
|
1142
|
+
return pl.DataFrame({"index": list(range(self.start, self.end)), "value": self.data})
|
|
1143
|
+
|
|
1144
|
+
def to_pandas(self, with_dates: bool = True) -> pd.DataFrame:
|
|
1145
|
+
"""Convert to Pandas DataFrame. Requires pandas to be installed.
|
|
1146
|
+
|
|
1147
|
+
Returns a DataFrame with columns:
|
|
1148
|
+
- 'date' (date) and 'value' (T) if with_dates=True and index is date-based
|
|
1149
|
+
- 'index' (int) and 'value' (T) otherwise
|
|
1150
|
+
"""
|
|
1151
|
+
try:
|
|
1152
|
+
import pandas as pd # type: ignore[import-not-found]
|
|
1153
|
+
except ImportError:
|
|
1154
|
+
raise ImportError("pandas is required: pip install pandas")
|
|
1155
|
+
if with_dates and self.index in _DATE_INDEXES:
|
|
1156
|
+
return pd.DataFrame({"date": self.dates(), "value": self.data})
|
|
1157
|
+
return pd.DataFrame({"index": list(range(self.start, self.end)), "value": self.data})
|
|
1158
|
+
|
|
1049
1159
|
|
|
1050
1160
|
# Type alias for non-generic usage
|
|
1051
1161
|
AnyMetricData = MetricData[Any]
|
|
@@ -1082,8 +1192,8 @@ class _EndpointConfig:
|
|
|
1082
1192
|
p = self.path()
|
|
1083
1193
|
return f"{p}?{query}" if query else p
|
|
1084
1194
|
|
|
1085
|
-
def
|
|
1086
|
-
return self.client.get_json(self._build_path())
|
|
1195
|
+
def get_metric(self) -> MetricData:
|
|
1196
|
+
return MetricData(**self.client.get_json(self._build_path()))
|
|
1087
1197
|
|
|
1088
1198
|
def get_csv(self) -> str:
|
|
1089
1199
|
return self.client.get_text(self._build_path(format='csv'))
|
|
@@ -1097,7 +1207,7 @@ class RangeBuilder(Generic[T]):
|
|
|
1097
1207
|
|
|
1098
1208
|
def fetch(self) -> MetricData[T]:
|
|
1099
1209
|
"""Fetch the range as parsed JSON."""
|
|
1100
|
-
return self._config.
|
|
1210
|
+
return self._config.get_metric()
|
|
1101
1211
|
|
|
1102
1212
|
def fetch_csv(self) -> str:
|
|
1103
1213
|
"""Fetch the range as CSV string."""
|
|
@@ -1112,7 +1222,7 @@ class SingleItemBuilder(Generic[T]):
|
|
|
1112
1222
|
|
|
1113
1223
|
def fetch(self) -> MetricData[T]:
|
|
1114
1224
|
"""Fetch the single item."""
|
|
1115
|
-
return self._config.
|
|
1225
|
+
return self._config.get_metric()
|
|
1116
1226
|
|
|
1117
1227
|
def fetch_csv(self) -> str:
|
|
1118
1228
|
"""Fetch as CSV."""
|
|
@@ -1135,7 +1245,7 @@ class SkippedBuilder(Generic[T]):
|
|
|
1135
1245
|
|
|
1136
1246
|
def fetch(self) -> MetricData[T]:
|
|
1137
1247
|
"""Fetch from skipped position to end."""
|
|
1138
|
-
return self._config.
|
|
1248
|
+
return self._config.get_metric()
|
|
1139
1249
|
|
|
1140
1250
|
def fetch_csv(self) -> str:
|
|
1141
1251
|
"""Fetch as CSV."""
|
|
@@ -1219,7 +1329,7 @@ class MetricEndpointBuilder(Generic[T]):
|
|
|
1219
1329
|
|
|
1220
1330
|
def fetch(self) -> MetricData[T]:
|
|
1221
1331
|
"""Fetch all data as parsed JSON."""
|
|
1222
|
-
return self._config.
|
|
1332
|
+
return self._config.get_metric()
|
|
1223
1333
|
|
|
1224
1334
|
def fetch_csv(self) -> str:
|
|
1225
1335
|
"""Fetch all data as CSV string."""
|
|
@@ -1284,9 +1394,8 @@ _i29 = ('weekindex',)
|
|
|
1284
1394
|
_i30 = ('yearindex',)
|
|
1285
1395
|
_i31 = ('loadedaddressindex',)
|
|
1286
1396
|
_i32 = ('emptyaddressindex',)
|
|
1287
|
-
_i33 = ('pairoutputindex',)
|
|
1288
1397
|
|
|
1289
|
-
def _ep(c: BrkClientBase, n: str, i: Index) -> MetricEndpointBuilder:
|
|
1398
|
+
def _ep(c: BrkClientBase, n: str, i: Index) -> MetricEndpointBuilder[Any]:
|
|
1290
1399
|
return MetricEndpointBuilder(c, n, i)
|
|
1291
1400
|
|
|
1292
1401
|
# Index accessor classes
|
|
@@ -1304,6 +1413,7 @@ class _MetricPattern1By(Generic[T]):
|
|
|
1304
1413
|
def yearindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'yearindex')
|
|
1305
1414
|
|
|
1306
1415
|
class MetricPattern1(Generic[T]):
|
|
1416
|
+
by: _MetricPattern1By[T]
|
|
1307
1417
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern1By(c, n)
|
|
1308
1418
|
@property
|
|
1309
1419
|
def name(self) -> str: return self._n
|
|
@@ -1322,6 +1432,7 @@ class _MetricPattern2By(Generic[T]):
|
|
|
1322
1432
|
def yearindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'yearindex')
|
|
1323
1433
|
|
|
1324
1434
|
class MetricPattern2(Generic[T]):
|
|
1435
|
+
by: _MetricPattern2By[T]
|
|
1325
1436
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern2By(c, n)
|
|
1326
1437
|
@property
|
|
1327
1438
|
def name(self) -> str: return self._n
|
|
@@ -1340,6 +1451,7 @@ class _MetricPattern3By(Generic[T]):
|
|
|
1340
1451
|
def yearindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'yearindex')
|
|
1341
1452
|
|
|
1342
1453
|
class MetricPattern3(Generic[T]):
|
|
1454
|
+
by: _MetricPattern3By[T]
|
|
1343
1455
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern3By(c, n)
|
|
1344
1456
|
@property
|
|
1345
1457
|
def name(self) -> str: return self._n
|
|
@@ -1357,6 +1469,7 @@ class _MetricPattern4By(Generic[T]):
|
|
|
1357
1469
|
def yearindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'yearindex')
|
|
1358
1470
|
|
|
1359
1471
|
class MetricPattern4(Generic[T]):
|
|
1472
|
+
by: _MetricPattern4By[T]
|
|
1360
1473
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern4By(c, n)
|
|
1361
1474
|
@property
|
|
1362
1475
|
def name(self) -> str: return self._n
|
|
@@ -1369,6 +1482,7 @@ class _MetricPattern5By(Generic[T]):
|
|
|
1369
1482
|
def height(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'height')
|
|
1370
1483
|
|
|
1371
1484
|
class MetricPattern5(Generic[T]):
|
|
1485
|
+
by: _MetricPattern5By[T]
|
|
1372
1486
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern5By(c, n)
|
|
1373
1487
|
@property
|
|
1374
1488
|
def name(self) -> str: return self._n
|
|
@@ -1380,6 +1494,7 @@ class _MetricPattern6By(Generic[T]):
|
|
|
1380
1494
|
def dateindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'dateindex')
|
|
1381
1495
|
|
|
1382
1496
|
class MetricPattern6(Generic[T]):
|
|
1497
|
+
by: _MetricPattern6By[T]
|
|
1383
1498
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern6By(c, n)
|
|
1384
1499
|
@property
|
|
1385
1500
|
def name(self) -> str: return self._n
|
|
@@ -1391,6 +1506,7 @@ class _MetricPattern7By(Generic[T]):
|
|
|
1391
1506
|
def decadeindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'decadeindex')
|
|
1392
1507
|
|
|
1393
1508
|
class MetricPattern7(Generic[T]):
|
|
1509
|
+
by: _MetricPattern7By[T]
|
|
1394
1510
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern7By(c, n)
|
|
1395
1511
|
@property
|
|
1396
1512
|
def name(self) -> str: return self._n
|
|
@@ -1402,6 +1518,7 @@ class _MetricPattern8By(Generic[T]):
|
|
|
1402
1518
|
def difficultyepoch(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'difficultyepoch')
|
|
1403
1519
|
|
|
1404
1520
|
class MetricPattern8(Generic[T]):
|
|
1521
|
+
by: _MetricPattern8By[T]
|
|
1405
1522
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern8By(c, n)
|
|
1406
1523
|
@property
|
|
1407
1524
|
def name(self) -> str: return self._n
|
|
@@ -1413,6 +1530,7 @@ class _MetricPattern9By(Generic[T]):
|
|
|
1413
1530
|
def emptyoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'emptyoutputindex')
|
|
1414
1531
|
|
|
1415
1532
|
class MetricPattern9(Generic[T]):
|
|
1533
|
+
by: _MetricPattern9By[T]
|
|
1416
1534
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern9By(c, n)
|
|
1417
1535
|
@property
|
|
1418
1536
|
def name(self) -> str: return self._n
|
|
@@ -1424,6 +1542,7 @@ class _MetricPattern10By(Generic[T]):
|
|
|
1424
1542
|
def halvingepoch(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'halvingepoch')
|
|
1425
1543
|
|
|
1426
1544
|
class MetricPattern10(Generic[T]):
|
|
1545
|
+
by: _MetricPattern10By[T]
|
|
1427
1546
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern10By(c, n)
|
|
1428
1547
|
@property
|
|
1429
1548
|
def name(self) -> str: return self._n
|
|
@@ -1435,6 +1554,7 @@ class _MetricPattern11By(Generic[T]):
|
|
|
1435
1554
|
def height(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'height')
|
|
1436
1555
|
|
|
1437
1556
|
class MetricPattern11(Generic[T]):
|
|
1557
|
+
by: _MetricPattern11By[T]
|
|
1438
1558
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern11By(c, n)
|
|
1439
1559
|
@property
|
|
1440
1560
|
def name(self) -> str: return self._n
|
|
@@ -1446,6 +1566,7 @@ class _MetricPattern12By(Generic[T]):
|
|
|
1446
1566
|
def txinindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'txinindex')
|
|
1447
1567
|
|
|
1448
1568
|
class MetricPattern12(Generic[T]):
|
|
1569
|
+
by: _MetricPattern12By[T]
|
|
1449
1570
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern12By(c, n)
|
|
1450
1571
|
@property
|
|
1451
1572
|
def name(self) -> str: return self._n
|
|
@@ -1457,6 +1578,7 @@ class _MetricPattern13By(Generic[T]):
|
|
|
1457
1578
|
def monthindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'monthindex')
|
|
1458
1579
|
|
|
1459
1580
|
class MetricPattern13(Generic[T]):
|
|
1581
|
+
by: _MetricPattern13By[T]
|
|
1460
1582
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern13By(c, n)
|
|
1461
1583
|
@property
|
|
1462
1584
|
def name(self) -> str: return self._n
|
|
@@ -1468,6 +1590,7 @@ class _MetricPattern14By(Generic[T]):
|
|
|
1468
1590
|
def opreturnindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'opreturnindex')
|
|
1469
1591
|
|
|
1470
1592
|
class MetricPattern14(Generic[T]):
|
|
1593
|
+
by: _MetricPattern14By[T]
|
|
1471
1594
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern14By(c, n)
|
|
1472
1595
|
@property
|
|
1473
1596
|
def name(self) -> str: return self._n
|
|
@@ -1479,6 +1602,7 @@ class _MetricPattern15By(Generic[T]):
|
|
|
1479
1602
|
def txoutindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'txoutindex')
|
|
1480
1603
|
|
|
1481
1604
|
class MetricPattern15(Generic[T]):
|
|
1605
|
+
by: _MetricPattern15By[T]
|
|
1482
1606
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern15By(c, n)
|
|
1483
1607
|
@property
|
|
1484
1608
|
def name(self) -> str: return self._n
|
|
@@ -1490,6 +1614,7 @@ class _MetricPattern16By(Generic[T]):
|
|
|
1490
1614
|
def p2aaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2aaddressindex')
|
|
1491
1615
|
|
|
1492
1616
|
class MetricPattern16(Generic[T]):
|
|
1617
|
+
by: _MetricPattern16By[T]
|
|
1493
1618
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern16By(c, n)
|
|
1494
1619
|
@property
|
|
1495
1620
|
def name(self) -> str: return self._n
|
|
@@ -1501,6 +1626,7 @@ class _MetricPattern17By(Generic[T]):
|
|
|
1501
1626
|
def p2msoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2msoutputindex')
|
|
1502
1627
|
|
|
1503
1628
|
class MetricPattern17(Generic[T]):
|
|
1629
|
+
by: _MetricPattern17By[T]
|
|
1504
1630
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern17By(c, n)
|
|
1505
1631
|
@property
|
|
1506
1632
|
def name(self) -> str: return self._n
|
|
@@ -1512,6 +1638,7 @@ class _MetricPattern18By(Generic[T]):
|
|
|
1512
1638
|
def p2pk33addressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2pk33addressindex')
|
|
1513
1639
|
|
|
1514
1640
|
class MetricPattern18(Generic[T]):
|
|
1641
|
+
by: _MetricPattern18By[T]
|
|
1515
1642
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern18By(c, n)
|
|
1516
1643
|
@property
|
|
1517
1644
|
def name(self) -> str: return self._n
|
|
@@ -1523,6 +1650,7 @@ class _MetricPattern19By(Generic[T]):
|
|
|
1523
1650
|
def p2pk65addressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2pk65addressindex')
|
|
1524
1651
|
|
|
1525
1652
|
class MetricPattern19(Generic[T]):
|
|
1653
|
+
by: _MetricPattern19By[T]
|
|
1526
1654
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern19By(c, n)
|
|
1527
1655
|
@property
|
|
1528
1656
|
def name(self) -> str: return self._n
|
|
@@ -1534,6 +1662,7 @@ class _MetricPattern20By(Generic[T]):
|
|
|
1534
1662
|
def p2pkhaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2pkhaddressindex')
|
|
1535
1663
|
|
|
1536
1664
|
class MetricPattern20(Generic[T]):
|
|
1665
|
+
by: _MetricPattern20By[T]
|
|
1537
1666
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern20By(c, n)
|
|
1538
1667
|
@property
|
|
1539
1668
|
def name(self) -> str: return self._n
|
|
@@ -1545,6 +1674,7 @@ class _MetricPattern21By(Generic[T]):
|
|
|
1545
1674
|
def p2shaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2shaddressindex')
|
|
1546
1675
|
|
|
1547
1676
|
class MetricPattern21(Generic[T]):
|
|
1677
|
+
by: _MetricPattern21By[T]
|
|
1548
1678
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern21By(c, n)
|
|
1549
1679
|
@property
|
|
1550
1680
|
def name(self) -> str: return self._n
|
|
@@ -1556,6 +1686,7 @@ class _MetricPattern22By(Generic[T]):
|
|
|
1556
1686
|
def p2traddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2traddressindex')
|
|
1557
1687
|
|
|
1558
1688
|
class MetricPattern22(Generic[T]):
|
|
1689
|
+
by: _MetricPattern22By[T]
|
|
1559
1690
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern22By(c, n)
|
|
1560
1691
|
@property
|
|
1561
1692
|
def name(self) -> str: return self._n
|
|
@@ -1567,6 +1698,7 @@ class _MetricPattern23By(Generic[T]):
|
|
|
1567
1698
|
def p2wpkhaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2wpkhaddressindex')
|
|
1568
1699
|
|
|
1569
1700
|
class MetricPattern23(Generic[T]):
|
|
1701
|
+
by: _MetricPattern23By[T]
|
|
1570
1702
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern23By(c, n)
|
|
1571
1703
|
@property
|
|
1572
1704
|
def name(self) -> str: return self._n
|
|
@@ -1578,6 +1710,7 @@ class _MetricPattern24By(Generic[T]):
|
|
|
1578
1710
|
def p2wshaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2wshaddressindex')
|
|
1579
1711
|
|
|
1580
1712
|
class MetricPattern24(Generic[T]):
|
|
1713
|
+
by: _MetricPattern24By[T]
|
|
1581
1714
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern24By(c, n)
|
|
1582
1715
|
@property
|
|
1583
1716
|
def name(self) -> str: return self._n
|
|
@@ -1589,6 +1722,7 @@ class _MetricPattern25By(Generic[T]):
|
|
|
1589
1722
|
def quarterindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'quarterindex')
|
|
1590
1723
|
|
|
1591
1724
|
class MetricPattern25(Generic[T]):
|
|
1725
|
+
by: _MetricPattern25By[T]
|
|
1592
1726
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern25By(c, n)
|
|
1593
1727
|
@property
|
|
1594
1728
|
def name(self) -> str: return self._n
|
|
@@ -1600,6 +1734,7 @@ class _MetricPattern26By(Generic[T]):
|
|
|
1600
1734
|
def semesterindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'semesterindex')
|
|
1601
1735
|
|
|
1602
1736
|
class MetricPattern26(Generic[T]):
|
|
1737
|
+
by: _MetricPattern26By[T]
|
|
1603
1738
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern26By(c, n)
|
|
1604
1739
|
@property
|
|
1605
1740
|
def name(self) -> str: return self._n
|
|
@@ -1611,6 +1746,7 @@ class _MetricPattern27By(Generic[T]):
|
|
|
1611
1746
|
def txindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'txindex')
|
|
1612
1747
|
|
|
1613
1748
|
class MetricPattern27(Generic[T]):
|
|
1749
|
+
by: _MetricPattern27By[T]
|
|
1614
1750
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern27By(c, n)
|
|
1615
1751
|
@property
|
|
1616
1752
|
def name(self) -> str: return self._n
|
|
@@ -1622,6 +1758,7 @@ class _MetricPattern28By(Generic[T]):
|
|
|
1622
1758
|
def unknownoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'unknownoutputindex')
|
|
1623
1759
|
|
|
1624
1760
|
class MetricPattern28(Generic[T]):
|
|
1761
|
+
by: _MetricPattern28By[T]
|
|
1625
1762
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern28By(c, n)
|
|
1626
1763
|
@property
|
|
1627
1764
|
def name(self) -> str: return self._n
|
|
@@ -1633,6 +1770,7 @@ class _MetricPattern29By(Generic[T]):
|
|
|
1633
1770
|
def weekindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'weekindex')
|
|
1634
1771
|
|
|
1635
1772
|
class MetricPattern29(Generic[T]):
|
|
1773
|
+
by: _MetricPattern29By[T]
|
|
1636
1774
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern29By(c, n)
|
|
1637
1775
|
@property
|
|
1638
1776
|
def name(self) -> str: return self._n
|
|
@@ -1644,6 +1782,7 @@ class _MetricPattern30By(Generic[T]):
|
|
|
1644
1782
|
def yearindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'yearindex')
|
|
1645
1783
|
|
|
1646
1784
|
class MetricPattern30(Generic[T]):
|
|
1785
|
+
by: _MetricPattern30By[T]
|
|
1647
1786
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern30By(c, n)
|
|
1648
1787
|
@property
|
|
1649
1788
|
def name(self) -> str: return self._n
|
|
@@ -1655,6 +1794,7 @@ class _MetricPattern31By(Generic[T]):
|
|
|
1655
1794
|
def loadedaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'loadedaddressindex')
|
|
1656
1795
|
|
|
1657
1796
|
class MetricPattern31(Generic[T]):
|
|
1797
|
+
by: _MetricPattern31By[T]
|
|
1658
1798
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern31By(c, n)
|
|
1659
1799
|
@property
|
|
1660
1800
|
def name(self) -> str: return self._n
|
|
@@ -1666,23 +1806,13 @@ class _MetricPattern32By(Generic[T]):
|
|
|
1666
1806
|
def emptyaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'emptyaddressindex')
|
|
1667
1807
|
|
|
1668
1808
|
class MetricPattern32(Generic[T]):
|
|
1809
|
+
by: _MetricPattern32By[T]
|
|
1669
1810
|
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern32By(c, n)
|
|
1670
1811
|
@property
|
|
1671
1812
|
def name(self) -> str: return self._n
|
|
1672
1813
|
def indexes(self) -> List[str]: return list(_i32)
|
|
1673
1814
|
def get(self, index: Index) -> Optional[MetricEndpointBuilder[T]]: return _ep(self.by._c, self._n, index) if index in _i32 else None
|
|
1674
1815
|
|
|
1675
|
-
class _MetricPattern33By(Generic[T]):
|
|
1676
|
-
def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n
|
|
1677
|
-
def pairoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'pairoutputindex')
|
|
1678
|
-
|
|
1679
|
-
class MetricPattern33(Generic[T]):
|
|
1680
|
-
def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern33By(c, n)
|
|
1681
|
-
@property
|
|
1682
|
-
def name(self) -> str: return self._n
|
|
1683
|
-
def indexes(self) -> List[str]: return list(_i33)
|
|
1684
|
-
def get(self, index: Index) -> Optional[MetricEndpointBuilder[T]]: return _ep(self.by._c, self._n, index) if index in _i33 else None
|
|
1685
|
-
|
|
1686
1816
|
# Reusable structural pattern classes
|
|
1687
1817
|
|
|
1688
1818
|
class RealizedPattern3:
|
|
@@ -1707,7 +1837,7 @@ class RealizedPattern3:
|
|
|
1707
1837
|
self.realized_cap_rel_to_own_market_cap: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'realized_cap_rel_to_own_market_cap'))
|
|
1708
1838
|
self.realized_loss: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'realized_loss'))
|
|
1709
1839
|
self.realized_loss_rel_to_realized_cap: BlockCountPattern[StoredF32] = BlockCountPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap'))
|
|
1710
|
-
self.realized_price:
|
|
1840
|
+
self.realized_price: ActivePricePattern = ActivePricePattern(client, _m(acc, 'realized_price'))
|
|
1711
1841
|
self.realized_price_extra: ActivePriceRatioPattern = ActivePriceRatioPattern(client, _m(acc, 'realized_price_ratio'))
|
|
1712
1842
|
self.realized_profit: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'realized_profit'))
|
|
1713
1843
|
self.realized_profit_rel_to_realized_cap: BlockCountPattern[StoredF32] = BlockCountPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap'))
|
|
@@ -1744,7 +1874,7 @@ class RealizedPattern4:
|
|
|
1744
1874
|
self.realized_cap_30d_delta: MetricPattern4[Dollars] = MetricPattern4(client, _m(acc, 'realized_cap_30d_delta'))
|
|
1745
1875
|
self.realized_loss: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'realized_loss'))
|
|
1746
1876
|
self.realized_loss_rel_to_realized_cap: BlockCountPattern[StoredF32] = BlockCountPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap'))
|
|
1747
|
-
self.realized_price:
|
|
1877
|
+
self.realized_price: ActivePricePattern = ActivePricePattern(client, _m(acc, 'realized_price'))
|
|
1748
1878
|
self.realized_price_extra: RealizedPriceExtraPattern = RealizedPriceExtraPattern(client, _m(acc, 'realized_price_ratio'))
|
|
1749
1879
|
self.realized_profit: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'realized_profit'))
|
|
1750
1880
|
self.realized_profit_rel_to_realized_cap: BlockCountPattern[StoredF32] = BlockCountPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap'))
|
|
@@ -1764,31 +1894,31 @@ class Ratio1ySdPattern:
|
|
|
1764
1894
|
|
|
1765
1895
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
1766
1896
|
"""Create pattern node with accumulated metric name."""
|
|
1767
|
-
self._0sd_usd:
|
|
1897
|
+
self._0sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, '0sd_usd'))
|
|
1768
1898
|
self.m0_5sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'm0_5sd'))
|
|
1769
|
-
self.m0_5sd_usd:
|
|
1899
|
+
self.m0_5sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'm0_5sd_usd'))
|
|
1770
1900
|
self.m1_5sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'm1_5sd'))
|
|
1771
|
-
self.m1_5sd_usd:
|
|
1901
|
+
self.m1_5sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'm1_5sd_usd'))
|
|
1772
1902
|
self.m1sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'm1sd'))
|
|
1773
|
-
self.m1sd_usd:
|
|
1903
|
+
self.m1sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'm1sd_usd'))
|
|
1774
1904
|
self.m2_5sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'm2_5sd'))
|
|
1775
|
-
self.m2_5sd_usd:
|
|
1905
|
+
self.m2_5sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'm2_5sd_usd'))
|
|
1776
1906
|
self.m2sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'm2sd'))
|
|
1777
|
-
self.m2sd_usd:
|
|
1907
|
+
self.m2sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'm2sd_usd'))
|
|
1778
1908
|
self.m3sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'm3sd'))
|
|
1779
|
-
self.m3sd_usd:
|
|
1909
|
+
self.m3sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'm3sd_usd'))
|
|
1780
1910
|
self.p0_5sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'p0_5sd'))
|
|
1781
|
-
self.p0_5sd_usd:
|
|
1911
|
+
self.p0_5sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'p0_5sd_usd'))
|
|
1782
1912
|
self.p1_5sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'p1_5sd'))
|
|
1783
|
-
self.p1_5sd_usd:
|
|
1913
|
+
self.p1_5sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'p1_5sd_usd'))
|
|
1784
1914
|
self.p1sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'p1sd'))
|
|
1785
|
-
self.p1sd_usd:
|
|
1915
|
+
self.p1sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'p1sd_usd'))
|
|
1786
1916
|
self.p2_5sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'p2_5sd'))
|
|
1787
|
-
self.p2_5sd_usd:
|
|
1917
|
+
self.p2_5sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'p2_5sd_usd'))
|
|
1788
1918
|
self.p2sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'p2sd'))
|
|
1789
|
-
self.p2sd_usd:
|
|
1919
|
+
self.p2sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'p2sd_usd'))
|
|
1790
1920
|
self.p3sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'p3sd'))
|
|
1791
|
-
self.p3sd_usd:
|
|
1921
|
+
self.p3sd_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'p3sd_usd'))
|
|
1792
1922
|
self.sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'sd'))
|
|
1793
1923
|
self.sma: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'sma'))
|
|
1794
1924
|
self.zscore: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'zscore'))
|
|
@@ -1810,7 +1940,7 @@ class RealizedPattern2:
|
|
|
1810
1940
|
self.realized_cap_rel_to_own_market_cap: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'realized_cap_rel_to_own_market_cap'))
|
|
1811
1941
|
self.realized_loss: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'realized_loss'))
|
|
1812
1942
|
self.realized_loss_rel_to_realized_cap: BlockCountPattern[StoredF32] = BlockCountPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap'))
|
|
1813
|
-
self.realized_price:
|
|
1943
|
+
self.realized_price: ActivePricePattern = ActivePricePattern(client, _m(acc, 'realized_price'))
|
|
1814
1944
|
self.realized_price_extra: ActivePriceRatioPattern = ActivePriceRatioPattern(client, _m(acc, 'realized_price_ratio'))
|
|
1815
1945
|
self.realized_profit: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'realized_profit'))
|
|
1816
1946
|
self.realized_profit_rel_to_realized_cap: BlockCountPattern[StoredF32] = BlockCountPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap'))
|
|
@@ -1842,7 +1972,7 @@ class RealizedPattern:
|
|
|
1842
1972
|
self.realized_cap_30d_delta: MetricPattern4[Dollars] = MetricPattern4(client, _m(acc, 'realized_cap_30d_delta'))
|
|
1843
1973
|
self.realized_loss: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'realized_loss'))
|
|
1844
1974
|
self.realized_loss_rel_to_realized_cap: BlockCountPattern[StoredF32] = BlockCountPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap'))
|
|
1845
|
-
self.realized_price:
|
|
1975
|
+
self.realized_price: ActivePricePattern = ActivePricePattern(client, _m(acc, 'realized_price'))
|
|
1846
1976
|
self.realized_price_extra: RealizedPriceExtraPattern = RealizedPriceExtraPattern(client, _m(acc, 'realized_price_ratio'))
|
|
1847
1977
|
self.realized_profit: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'realized_profit'))
|
|
1848
1978
|
self.realized_profit_rel_to_realized_cap: BlockCountPattern[StoredF32] = BlockCountPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap'))
|
|
@@ -1862,7 +1992,7 @@ class Price111dSmaPattern:
|
|
|
1862
1992
|
|
|
1863
1993
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
1864
1994
|
"""Create pattern node with accumulated metric name."""
|
|
1865
|
-
self.price:
|
|
1995
|
+
self.price: _0sdUsdPattern = _0sdUsdPattern(client, acc)
|
|
1866
1996
|
self.ratio: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'ratio'))
|
|
1867
1997
|
self.ratio_1m_sma: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'ratio_1m_sma'))
|
|
1868
1998
|
self.ratio_1w_sma: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'ratio_1w_sma'))
|
|
@@ -1870,17 +2000,17 @@ class Price111dSmaPattern:
|
|
|
1870
2000
|
self.ratio_2y_sd: Ratio1ySdPattern = Ratio1ySdPattern(client, _m(acc, 'ratio_2y'))
|
|
1871
2001
|
self.ratio_4y_sd: Ratio1ySdPattern = Ratio1ySdPattern(client, _m(acc, 'ratio_4y'))
|
|
1872
2002
|
self.ratio_pct1: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'ratio_pct1'))
|
|
1873
|
-
self.ratio_pct1_usd:
|
|
2003
|
+
self.ratio_pct1_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'ratio_pct1_usd'))
|
|
1874
2004
|
self.ratio_pct2: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'ratio_pct2'))
|
|
1875
|
-
self.ratio_pct2_usd:
|
|
2005
|
+
self.ratio_pct2_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'ratio_pct2_usd'))
|
|
1876
2006
|
self.ratio_pct5: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'ratio_pct5'))
|
|
1877
|
-
self.ratio_pct5_usd:
|
|
2007
|
+
self.ratio_pct5_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'ratio_pct5_usd'))
|
|
1878
2008
|
self.ratio_pct95: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'ratio_pct95'))
|
|
1879
|
-
self.ratio_pct95_usd:
|
|
2009
|
+
self.ratio_pct95_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'ratio_pct95_usd'))
|
|
1880
2010
|
self.ratio_pct98: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'ratio_pct98'))
|
|
1881
|
-
self.ratio_pct98_usd:
|
|
2011
|
+
self.ratio_pct98_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'ratio_pct98_usd'))
|
|
1882
2012
|
self.ratio_pct99: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'ratio_pct99'))
|
|
1883
|
-
self.ratio_pct99_usd:
|
|
2013
|
+
self.ratio_pct99_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'ratio_pct99_usd'))
|
|
1884
2014
|
self.ratio_sd: Ratio1ySdPattern = Ratio1ySdPattern(client, _m(acc, 'ratio'))
|
|
1885
2015
|
|
|
1886
2016
|
class PercentilesPattern:
|
|
@@ -1888,25 +2018,25 @@ class PercentilesPattern:
|
|
|
1888
2018
|
|
|
1889
2019
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
1890
2020
|
"""Create pattern node with accumulated metric name."""
|
|
1891
|
-
self.pct05:
|
|
1892
|
-
self.pct10:
|
|
1893
|
-
self.pct15:
|
|
1894
|
-
self.pct20:
|
|
1895
|
-
self.pct25:
|
|
1896
|
-
self.pct30:
|
|
1897
|
-
self.pct35:
|
|
1898
|
-
self.pct40:
|
|
1899
|
-
self.pct45:
|
|
1900
|
-
self.pct50:
|
|
1901
|
-
self.pct55:
|
|
1902
|
-
self.pct60:
|
|
1903
|
-
self.pct65:
|
|
1904
|
-
self.pct70:
|
|
1905
|
-
self.pct75:
|
|
1906
|
-
self.pct80:
|
|
1907
|
-
self.pct85:
|
|
1908
|
-
self.pct90:
|
|
1909
|
-
self.pct95:
|
|
2021
|
+
self.pct05: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct05'))
|
|
2022
|
+
self.pct10: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct10'))
|
|
2023
|
+
self.pct15: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct15'))
|
|
2024
|
+
self.pct20: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct20'))
|
|
2025
|
+
self.pct25: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct25'))
|
|
2026
|
+
self.pct30: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct30'))
|
|
2027
|
+
self.pct35: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct35'))
|
|
2028
|
+
self.pct40: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct40'))
|
|
2029
|
+
self.pct45: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct45'))
|
|
2030
|
+
self.pct50: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct50'))
|
|
2031
|
+
self.pct55: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct55'))
|
|
2032
|
+
self.pct60: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct60'))
|
|
2033
|
+
self.pct65: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct65'))
|
|
2034
|
+
self.pct70: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct70'))
|
|
2035
|
+
self.pct75: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct75'))
|
|
2036
|
+
self.pct80: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct80'))
|
|
2037
|
+
self.pct85: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct85'))
|
|
2038
|
+
self.pct90: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct90'))
|
|
2039
|
+
self.pct95: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct95'))
|
|
1910
2040
|
|
|
1911
2041
|
class ActivePriceRatioPattern:
|
|
1912
2042
|
"""Pattern struct for repeated tree structure."""
|
|
@@ -1920,17 +2050,17 @@ class ActivePriceRatioPattern:
|
|
|
1920
2050
|
self.ratio_2y_sd: Ratio1ySdPattern = Ratio1ySdPattern(client, _m(acc, '2y'))
|
|
1921
2051
|
self.ratio_4y_sd: Ratio1ySdPattern = Ratio1ySdPattern(client, _m(acc, '4y'))
|
|
1922
2052
|
self.ratio_pct1: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'pct1'))
|
|
1923
|
-
self.ratio_pct1_usd:
|
|
2053
|
+
self.ratio_pct1_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct1_usd'))
|
|
1924
2054
|
self.ratio_pct2: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'pct2'))
|
|
1925
|
-
self.ratio_pct2_usd:
|
|
2055
|
+
self.ratio_pct2_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct2_usd'))
|
|
1926
2056
|
self.ratio_pct5: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'pct5'))
|
|
1927
|
-
self.ratio_pct5_usd:
|
|
2057
|
+
self.ratio_pct5_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct5_usd'))
|
|
1928
2058
|
self.ratio_pct95: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'pct95'))
|
|
1929
|
-
self.ratio_pct95_usd:
|
|
2059
|
+
self.ratio_pct95_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct95_usd'))
|
|
1930
2060
|
self.ratio_pct98: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'pct98'))
|
|
1931
|
-
self.ratio_pct98_usd:
|
|
2061
|
+
self.ratio_pct98_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct98_usd'))
|
|
1932
2062
|
self.ratio_pct99: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'pct99'))
|
|
1933
|
-
self.ratio_pct99_usd:
|
|
2063
|
+
self.ratio_pct99_usd: _0sdUsdPattern = _0sdUsdPattern(client, _m(acc, 'pct99_usd'))
|
|
1934
2064
|
self.ratio_sd: Ratio1ySdPattern = Ratio1ySdPattern(client, acc)
|
|
1935
2065
|
|
|
1936
2066
|
class RelativePattern5:
|
|
@@ -1971,31 +2101,13 @@ class AaopoolPattern:
|
|
|
1971
2101
|
self._24h_blocks_mined: MetricPattern1[StoredU32] = MetricPattern1(client, _m(acc, '24h_blocks_mined'))
|
|
1972
2102
|
self._24h_dominance: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, '24h_dominance'))
|
|
1973
2103
|
self.blocks_mined: BlockCountPattern[StoredU32] = BlockCountPattern(client, _m(acc, 'blocks_mined'))
|
|
2104
|
+
self.blocks_since_block: MetricPattern1[StoredU32] = MetricPattern1(client, _m(acc, 'blocks_since_block'))
|
|
1974
2105
|
self.coinbase: CoinbasePattern2 = CoinbasePattern2(client, _m(acc, 'coinbase'))
|
|
1975
2106
|
self.days_since_block: MetricPattern4[StoredU16] = MetricPattern4(client, _m(acc, 'days_since_block'))
|
|
1976
2107
|
self.dominance: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'dominance'))
|
|
1977
2108
|
self.fee: UnclaimedRewardsPattern = UnclaimedRewardsPattern(client, _m(acc, 'fee'))
|
|
1978
2109
|
self.subsidy: UnclaimedRewardsPattern = UnclaimedRewardsPattern(client, _m(acc, 'subsidy'))
|
|
1979
2110
|
|
|
1980
|
-
class LookbackPattern(Generic[T]):
|
|
1981
|
-
"""Pattern struct for repeated tree structure."""
|
|
1982
|
-
|
|
1983
|
-
def __init__(self, client: BrkClientBase, acc: str):
|
|
1984
|
-
"""Create pattern node with accumulated metric name."""
|
|
1985
|
-
self._10y: MetricPattern4[T] = MetricPattern4(client, _m(acc, '10y_ago'))
|
|
1986
|
-
self._1d: MetricPattern4[T] = MetricPattern4(client, _m(acc, '1d_ago'))
|
|
1987
|
-
self._1m: MetricPattern4[T] = MetricPattern4(client, _m(acc, '1m_ago'))
|
|
1988
|
-
self._1w: MetricPattern4[T] = MetricPattern4(client, _m(acc, '1w_ago'))
|
|
1989
|
-
self._1y: MetricPattern4[T] = MetricPattern4(client, _m(acc, '1y_ago'))
|
|
1990
|
-
self._2y: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2y_ago'))
|
|
1991
|
-
self._3m: MetricPattern4[T] = MetricPattern4(client, _m(acc, '3m_ago'))
|
|
1992
|
-
self._3y: MetricPattern4[T] = MetricPattern4(client, _m(acc, '3y_ago'))
|
|
1993
|
-
self._4y: MetricPattern4[T] = MetricPattern4(client, _m(acc, '4y_ago'))
|
|
1994
|
-
self._5y: MetricPattern4[T] = MetricPattern4(client, _m(acc, '5y_ago'))
|
|
1995
|
-
self._6m: MetricPattern4[T] = MetricPattern4(client, _m(acc, '6m_ago'))
|
|
1996
|
-
self._6y: MetricPattern4[T] = MetricPattern4(client, _m(acc, '6y_ago'))
|
|
1997
|
-
self._8y: MetricPattern4[T] = MetricPattern4(client, _m(acc, '8y_ago'))
|
|
1998
|
-
|
|
1999
2111
|
class PeriodLumpSumStackPattern:
|
|
2000
2112
|
"""Pattern struct for repeated tree structure."""
|
|
2001
2113
|
|
|
@@ -2014,7 +2126,7 @@ class PeriodLumpSumStackPattern:
|
|
|
2014
2126
|
self._6y: _2015Pattern = _2015Pattern(client, _p('6y', acc))
|
|
2015
2127
|
self._8y: _2015Pattern = _2015Pattern(client, _p('8y', acc))
|
|
2016
2128
|
|
|
2017
|
-
class
|
|
2129
|
+
class PeriodDaysInLossPattern(Generic[T]):
|
|
2018
2130
|
"""Pattern struct for repeated tree structure."""
|
|
2019
2131
|
|
|
2020
2132
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
@@ -2032,6 +2144,24 @@ class PeriodAveragePricePattern(Generic[T]):
|
|
|
2032
2144
|
self._6y: MetricPattern4[T] = MetricPattern4(client, _p('6y', acc))
|
|
2033
2145
|
self._8y: MetricPattern4[T] = MetricPattern4(client, _p('8y', acc))
|
|
2034
2146
|
|
|
2147
|
+
class ClassDaysInLossPattern(Generic[T]):
|
|
2148
|
+
"""Pattern struct for repeated tree structure."""
|
|
2149
|
+
|
|
2150
|
+
def __init__(self, client: BrkClientBase, acc: str):
|
|
2151
|
+
"""Create pattern node with accumulated metric name."""
|
|
2152
|
+
self._2015: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2015_returns'))
|
|
2153
|
+
self._2016: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2016_returns'))
|
|
2154
|
+
self._2017: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2017_returns'))
|
|
2155
|
+
self._2018: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2018_returns'))
|
|
2156
|
+
self._2019: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2019_returns'))
|
|
2157
|
+
self._2020: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2020_returns'))
|
|
2158
|
+
self._2021: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2021_returns'))
|
|
2159
|
+
self._2022: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2022_returns'))
|
|
2160
|
+
self._2023: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2023_returns'))
|
|
2161
|
+
self._2024: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2024_returns'))
|
|
2162
|
+
self._2025: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2025_returns'))
|
|
2163
|
+
self._2026: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2026_returns'))
|
|
2164
|
+
|
|
2035
2165
|
class BitcoinPattern:
|
|
2036
2166
|
"""Pattern struct for repeated tree structure."""
|
|
2037
2167
|
|
|
@@ -2066,23 +2196,6 @@ class DollarsPattern(Generic[T]):
|
|
|
2066
2196
|
self.pct90: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'pct90'))
|
|
2067
2197
|
self.sum: MetricPattern2[T] = MetricPattern2(client, _m(acc, 'sum'))
|
|
2068
2198
|
|
|
2069
|
-
class ClassAveragePricePattern(Generic[T]):
|
|
2070
|
-
"""Pattern struct for repeated tree structure."""
|
|
2071
|
-
|
|
2072
|
-
def __init__(self, client: BrkClientBase, acc: str):
|
|
2073
|
-
"""Create pattern node with accumulated metric name."""
|
|
2074
|
-
self._2015: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2015_returns'))
|
|
2075
|
-
self._2016: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2016_returns'))
|
|
2076
|
-
self._2017: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2017_returns'))
|
|
2077
|
-
self._2018: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2018_returns'))
|
|
2078
|
-
self._2019: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2019_returns'))
|
|
2079
|
-
self._2020: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2020_returns'))
|
|
2080
|
-
self._2021: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2021_returns'))
|
|
2081
|
-
self._2022: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2022_returns'))
|
|
2082
|
-
self._2023: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2023_returns'))
|
|
2083
|
-
self._2024: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2024_returns'))
|
|
2084
|
-
self._2025: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2025_returns'))
|
|
2085
|
-
|
|
2086
2199
|
class RelativePattern:
|
|
2087
2200
|
"""Pattern struct for repeated tree structure."""
|
|
2088
2201
|
|
|
@@ -2190,20 +2303,6 @@ class _0satsPattern:
|
|
|
2190
2303
|
self.supply: SupplyPattern2 = SupplyPattern2(client, _m(acc, 'supply'))
|
|
2191
2304
|
self.unrealized: UnrealizedPattern = UnrealizedPattern(client, acc)
|
|
2192
2305
|
|
|
2193
|
-
class PhaseDailyCentsPattern(Generic[T]):
|
|
2194
|
-
"""Pattern struct for repeated tree structure."""
|
|
2195
|
-
|
|
2196
|
-
def __init__(self, client: BrkClientBase, acc: str):
|
|
2197
|
-
"""Create pattern node with accumulated metric name."""
|
|
2198
|
-
self.average: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'average'))
|
|
2199
|
-
self.max: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'max'))
|
|
2200
|
-
self.median: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'median'))
|
|
2201
|
-
self.min: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'min'))
|
|
2202
|
-
self.pct10: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'pct10'))
|
|
2203
|
-
self.pct25: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'pct25'))
|
|
2204
|
-
self.pct75: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'pct75'))
|
|
2205
|
-
self.pct90: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'pct90'))
|
|
2206
|
-
|
|
2207
2306
|
class PeriodCagrPattern:
|
|
2208
2307
|
"""Pattern struct for repeated tree structure."""
|
|
2209
2308
|
|
|
@@ -2217,7 +2316,7 @@ class PeriodCagrPattern:
|
|
|
2217
2316
|
self._6y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('6y', acc))
|
|
2218
2317
|
self._8y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('8y', acc))
|
|
2219
2318
|
|
|
2220
|
-
class
|
|
2319
|
+
class _100btcPattern:
|
|
2221
2320
|
"""Pattern struct for repeated tree structure."""
|
|
2222
2321
|
|
|
2223
2322
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
@@ -2226,11 +2325,11 @@ class _0satsPattern2:
|
|
|
2226
2325
|
self.cost_basis: CostBasisPattern = CostBasisPattern(client, acc)
|
|
2227
2326
|
self.outputs: OutputsPattern = OutputsPattern(client, _m(acc, 'utxo_count'))
|
|
2228
2327
|
self.realized: RealizedPattern = RealizedPattern(client, acc)
|
|
2229
|
-
self.relative:
|
|
2328
|
+
self.relative: RelativePattern = RelativePattern(client, acc)
|
|
2230
2329
|
self.supply: SupplyPattern2 = SupplyPattern2(client, _m(acc, 'supply'))
|
|
2231
2330
|
self.unrealized: UnrealizedPattern = UnrealizedPattern(client, acc)
|
|
2232
2331
|
|
|
2233
|
-
class
|
|
2332
|
+
class _0satsPattern2:
|
|
2234
2333
|
"""Pattern struct for repeated tree structure."""
|
|
2235
2334
|
|
|
2236
2335
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
@@ -2238,34 +2337,34 @@ class _10yPattern:
|
|
|
2238
2337
|
self.activity: ActivityPattern2 = ActivityPattern2(client, acc)
|
|
2239
2338
|
self.cost_basis: CostBasisPattern = CostBasisPattern(client, acc)
|
|
2240
2339
|
self.outputs: OutputsPattern = OutputsPattern(client, _m(acc, 'utxo_count'))
|
|
2241
|
-
self.realized:
|
|
2242
|
-
self.relative:
|
|
2340
|
+
self.realized: RealizedPattern = RealizedPattern(client, acc)
|
|
2341
|
+
self.relative: RelativePattern4 = RelativePattern4(client, _m(acc, 'supply_in'))
|
|
2243
2342
|
self.supply: SupplyPattern2 = SupplyPattern2(client, _m(acc, 'supply'))
|
|
2244
2343
|
self.unrealized: UnrealizedPattern = UnrealizedPattern(client, acc)
|
|
2245
2344
|
|
|
2246
|
-
class
|
|
2345
|
+
class _10yPattern:
|
|
2247
2346
|
"""Pattern struct for repeated tree structure."""
|
|
2248
2347
|
|
|
2249
2348
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2250
2349
|
"""Create pattern node with accumulated metric name."""
|
|
2251
2350
|
self.activity: ActivityPattern2 = ActivityPattern2(client, acc)
|
|
2252
|
-
self.cost_basis:
|
|
2351
|
+
self.cost_basis: CostBasisPattern = CostBasisPattern(client, acc)
|
|
2253
2352
|
self.outputs: OutputsPattern = OutputsPattern(client, _m(acc, 'utxo_count'))
|
|
2254
|
-
self.realized:
|
|
2255
|
-
self.relative:
|
|
2353
|
+
self.realized: RealizedPattern4 = RealizedPattern4(client, acc)
|
|
2354
|
+
self.relative: RelativePattern = RelativePattern(client, acc)
|
|
2256
2355
|
self.supply: SupplyPattern2 = SupplyPattern2(client, _m(acc, 'supply'))
|
|
2257
2356
|
self.unrealized: UnrealizedPattern = UnrealizedPattern(client, acc)
|
|
2258
2357
|
|
|
2259
|
-
class
|
|
2358
|
+
class _10yTo12yPattern:
|
|
2260
2359
|
"""Pattern struct for repeated tree structure."""
|
|
2261
2360
|
|
|
2262
2361
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2263
2362
|
"""Create pattern node with accumulated metric name."""
|
|
2264
2363
|
self.activity: ActivityPattern2 = ActivityPattern2(client, acc)
|
|
2265
|
-
self.cost_basis:
|
|
2364
|
+
self.cost_basis: CostBasisPattern2 = CostBasisPattern2(client, acc)
|
|
2266
2365
|
self.outputs: OutputsPattern = OutputsPattern(client, _m(acc, 'utxo_count'))
|
|
2267
|
-
self.realized:
|
|
2268
|
-
self.relative:
|
|
2366
|
+
self.realized: RealizedPattern2 = RealizedPattern2(client, acc)
|
|
2367
|
+
self.relative: RelativePattern2 = RelativePattern2(client, acc)
|
|
2269
2368
|
self.supply: SupplyPattern2 = SupplyPattern2(client, _m(acc, 'supply'))
|
|
2270
2369
|
self.unrealized: UnrealizedPattern = UnrealizedPattern(client, acc)
|
|
2271
2370
|
|
|
@@ -2282,6 +2381,18 @@ class UnrealizedPattern:
|
|
|
2282
2381
|
self.unrealized_loss: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'unrealized_loss'))
|
|
2283
2382
|
self.unrealized_profit: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'unrealized_profit'))
|
|
2284
2383
|
|
|
2384
|
+
class AllPattern:
|
|
2385
|
+
"""Pattern struct for repeated tree structure."""
|
|
2386
|
+
|
|
2387
|
+
def __init__(self, client: BrkClientBase, acc: str):
|
|
2388
|
+
"""Create pattern node with accumulated metric name."""
|
|
2389
|
+
self.balance_decreased: FullnessPattern[StoredU32] = FullnessPattern(client, _m(acc, 'balance_decreased'))
|
|
2390
|
+
self.balance_increased: FullnessPattern[StoredU32] = FullnessPattern(client, _m(acc, 'balance_increased'))
|
|
2391
|
+
self.both: FullnessPattern[StoredU32] = FullnessPattern(client, _m(acc, 'both'))
|
|
2392
|
+
self.reactivated: FullnessPattern[StoredU32] = FullnessPattern(client, _m(acc, 'reactivated'))
|
|
2393
|
+
self.receiving: FullnessPattern[StoredU32] = FullnessPattern(client, _m(acc, 'receiving'))
|
|
2394
|
+
self.sending: FullnessPattern[StoredU32] = FullnessPattern(client, _m(acc, 'sending'))
|
|
2395
|
+
|
|
2285
2396
|
class ActivityPattern2:
|
|
2286
2397
|
"""Pattern struct for repeated tree structure."""
|
|
2287
2398
|
|
|
@@ -2303,32 +2414,41 @@ class SplitPattern2(Generic[T]):
|
|
|
2303
2414
|
self.low: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'low'))
|
|
2304
2415
|
self.open: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'open'))
|
|
2305
2416
|
|
|
2306
|
-
class
|
|
2417
|
+
class SegwitAdoptionPattern:
|
|
2307
2418
|
"""Pattern struct for repeated tree structure."""
|
|
2308
2419
|
|
|
2309
2420
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2310
2421
|
"""Create pattern node with accumulated metric name."""
|
|
2311
|
-
self.
|
|
2312
|
-
self.
|
|
2313
|
-
self.
|
|
2422
|
+
self.base: MetricPattern11[StoredF32] = MetricPattern11(client, acc)
|
|
2423
|
+
self.cumulative: MetricPattern2[StoredF32] = MetricPattern2(client, _m(acc, 'cumulative'))
|
|
2424
|
+
self.sum: MetricPattern2[StoredF32] = MetricPattern2(client, _m(acc, 'sum'))
|
|
2314
2425
|
|
|
2315
|
-
class
|
|
2426
|
+
class ActiveSupplyPattern:
|
|
2316
2427
|
"""Pattern struct for repeated tree structure."""
|
|
2317
2428
|
|
|
2318
2429
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2319
2430
|
"""Create pattern node with accumulated metric name."""
|
|
2320
|
-
self.bitcoin:
|
|
2321
|
-
self.dollars:
|
|
2322
|
-
self.sats:
|
|
2431
|
+
self.bitcoin: MetricPattern1[Bitcoin] = MetricPattern1(client, _m(acc, 'btc'))
|
|
2432
|
+
self.dollars: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'usd'))
|
|
2433
|
+
self.sats: MetricPattern1[Sats] = MetricPattern1(client, acc)
|
|
2323
2434
|
|
|
2324
|
-
class
|
|
2435
|
+
class _2015Pattern:
|
|
2325
2436
|
"""Pattern struct for repeated tree structure."""
|
|
2326
2437
|
|
|
2327
2438
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2328
2439
|
"""Create pattern node with accumulated metric name."""
|
|
2329
|
-
self.bitcoin:
|
|
2330
|
-
self.dollars:
|
|
2331
|
-
self.sats:
|
|
2440
|
+
self.bitcoin: MetricPattern4[Bitcoin] = MetricPattern4(client, _m(acc, 'btc'))
|
|
2441
|
+
self.dollars: MetricPattern4[Dollars] = MetricPattern4(client, _m(acc, 'usd'))
|
|
2442
|
+
self.sats: MetricPattern4[Sats] = MetricPattern4(client, acc)
|
|
2443
|
+
|
|
2444
|
+
class CoinbasePattern:
|
|
2445
|
+
"""Pattern struct for repeated tree structure."""
|
|
2446
|
+
|
|
2447
|
+
def __init__(self, client: BrkClientBase, acc: str):
|
|
2448
|
+
"""Create pattern node with accumulated metric name."""
|
|
2449
|
+
self.bitcoin: BitcoinPattern = BitcoinPattern(client, _m(acc, 'btc'))
|
|
2450
|
+
self.dollars: DollarsPattern[Dollars] = DollarsPattern(client, _m(acc, 'usd'))
|
|
2451
|
+
self.sats: DollarsPattern[Sats] = DollarsPattern(client, acc)
|
|
2332
2452
|
|
|
2333
2453
|
class UnclaimedRewardsPattern:
|
|
2334
2454
|
"""Pattern struct for repeated tree structure."""
|
|
@@ -2348,39 +2468,54 @@ class CoinbasePattern2:
|
|
|
2348
2468
|
self.dollars: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'usd'))
|
|
2349
2469
|
self.sats: BlockCountPattern[Sats] = BlockCountPattern(client, acc)
|
|
2350
2470
|
|
|
2351
|
-
class
|
|
2471
|
+
class CostBasisPattern2:
|
|
2352
2472
|
"""Pattern struct for repeated tree structure."""
|
|
2353
2473
|
|
|
2354
2474
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2355
2475
|
"""Create pattern node with accumulated metric name."""
|
|
2356
|
-
self.
|
|
2357
|
-
self.
|
|
2358
|
-
self.
|
|
2476
|
+
self.max: ActivePricePattern = ActivePricePattern(client, _m(acc, 'max_cost_basis'))
|
|
2477
|
+
self.min: ActivePricePattern = ActivePricePattern(client, _m(acc, 'min_cost_basis'))
|
|
2478
|
+
self.percentiles: PercentilesPattern = PercentilesPattern(client, _m(acc, 'cost_basis'))
|
|
2359
2479
|
|
|
2360
|
-
class
|
|
2480
|
+
class ActivePricePattern:
|
|
2361
2481
|
"""Pattern struct for repeated tree structure."""
|
|
2362
2482
|
|
|
2363
2483
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2364
2484
|
"""Create pattern node with accumulated metric name."""
|
|
2365
|
-
self.
|
|
2366
|
-
self.
|
|
2367
|
-
self.sum: MetricPattern2[StoredF32] = MetricPattern2(client, _m(acc, 'sum'))
|
|
2485
|
+
self.dollars: MetricPattern1[Dollars] = MetricPattern1(client, acc)
|
|
2486
|
+
self.sats: MetricPattern1[SatsFract] = MetricPattern1(client, _m(acc, 'sats'))
|
|
2368
2487
|
|
|
2369
|
-
class
|
|
2488
|
+
class _0sdUsdPattern:
|
|
2370
2489
|
"""Pattern struct for repeated tree structure."""
|
|
2371
2490
|
|
|
2372
2491
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2373
2492
|
"""Create pattern node with accumulated metric name."""
|
|
2374
|
-
self.
|
|
2375
|
-
self.
|
|
2493
|
+
self.dollars: MetricPattern4[Dollars] = MetricPattern4(client, acc)
|
|
2494
|
+
self.sats: MetricPattern4[SatsFract] = MetricPattern4(client, _m(acc, 'sats'))
|
|
2495
|
+
|
|
2496
|
+
class SupplyPattern2:
|
|
2497
|
+
"""Pattern struct for repeated tree structure."""
|
|
2498
|
+
|
|
2499
|
+
def __init__(self, client: BrkClientBase, acc: str):
|
|
2500
|
+
"""Create pattern node with accumulated metric name."""
|
|
2501
|
+
self.halved: ActiveSupplyPattern = ActiveSupplyPattern(client, _m(acc, 'halved'))
|
|
2502
|
+
self.total: ActiveSupplyPattern = ActiveSupplyPattern(client, acc)
|
|
2376
2503
|
|
|
2377
2504
|
class CostBasisPattern:
|
|
2378
2505
|
"""Pattern struct for repeated tree structure."""
|
|
2379
2506
|
|
|
2380
2507
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2381
2508
|
"""Create pattern node with accumulated metric name."""
|
|
2382
|
-
self.max:
|
|
2383
|
-
self.min:
|
|
2509
|
+
self.max: ActivePricePattern = ActivePricePattern(client, _m(acc, 'max_cost_basis'))
|
|
2510
|
+
self.min: ActivePricePattern = ActivePricePattern(client, _m(acc, 'min_cost_basis'))
|
|
2511
|
+
|
|
2512
|
+
class _1dReturns1mSdPattern:
|
|
2513
|
+
"""Pattern struct for repeated tree structure."""
|
|
2514
|
+
|
|
2515
|
+
def __init__(self, client: BrkClientBase, acc: str):
|
|
2516
|
+
"""Create pattern node with accumulated metric name."""
|
|
2517
|
+
self.sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'sd'))
|
|
2518
|
+
self.sma: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'sma'))
|
|
2384
2519
|
|
|
2385
2520
|
class RelativePattern4:
|
|
2386
2521
|
"""Pattern struct for repeated tree structure."""
|
|
@@ -2390,13 +2525,13 @@ class RelativePattern4:
|
|
|
2390
2525
|
self.supply_in_loss_rel_to_own_supply: MetricPattern1[StoredF64] = MetricPattern1(client, _m(acc, 'loss_rel_to_own_supply'))
|
|
2391
2526
|
self.supply_in_profit_rel_to_own_supply: MetricPattern1[StoredF64] = MetricPattern1(client, _m(acc, 'profit_rel_to_own_supply'))
|
|
2392
2527
|
|
|
2393
|
-
class
|
|
2528
|
+
class BlockCountPattern(Generic[T]):
|
|
2394
2529
|
"""Pattern struct for repeated tree structure."""
|
|
2395
2530
|
|
|
2396
2531
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2397
2532
|
"""Create pattern node with accumulated metric name."""
|
|
2398
|
-
self.
|
|
2399
|
-
self.
|
|
2533
|
+
self.cumulative: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'cumulative'))
|
|
2534
|
+
self.sum: MetricPattern1[T] = MetricPattern1(client, acc)
|
|
2400
2535
|
|
|
2401
2536
|
class BitcoinPattern2(Generic[T]):
|
|
2402
2537
|
"""Pattern struct for repeated tree structure."""
|
|
@@ -2414,13 +2549,12 @@ class SatsPattern(Generic[T]):
|
|
|
2414
2549
|
self.ohlc: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'ohlc_sats'))
|
|
2415
2550
|
self.split: SplitPattern2[T] = SplitPattern2(client, _m(acc, 'sats'))
|
|
2416
2551
|
|
|
2417
|
-
class
|
|
2552
|
+
class RealizedPriceExtraPattern:
|
|
2418
2553
|
"""Pattern struct for repeated tree structure."""
|
|
2419
2554
|
|
|
2420
2555
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2421
2556
|
"""Create pattern node with accumulated metric name."""
|
|
2422
|
-
self.
|
|
2423
|
-
self.sum: MetricPattern1[T] = MetricPattern1(client, acc)
|
|
2557
|
+
self.ratio: MetricPattern4[StoredF32] = MetricPattern4(client, acc)
|
|
2424
2558
|
|
|
2425
2559
|
class OutputsPattern:
|
|
2426
2560
|
"""Pattern struct for repeated tree structure."""
|
|
@@ -2429,13 +2563,6 @@ class OutputsPattern:
|
|
|
2429
2563
|
"""Create pattern node with accumulated metric name."""
|
|
2430
2564
|
self.utxo_count: MetricPattern1[StoredU64] = MetricPattern1(client, acc)
|
|
2431
2565
|
|
|
2432
|
-
class RealizedPriceExtraPattern:
|
|
2433
|
-
"""Pattern struct for repeated tree structure."""
|
|
2434
|
-
|
|
2435
|
-
def __init__(self, client: BrkClientBase, acc: str):
|
|
2436
|
-
"""Create pattern node with accumulated metric name."""
|
|
2437
|
-
self.ratio: MetricPattern4[StoredF32] = MetricPattern4(client, acc)
|
|
2438
|
-
|
|
2439
2566
|
# Metrics tree classes
|
|
2440
2567
|
|
|
2441
2568
|
class MetricsTree_Addresses:
|
|
@@ -2606,15 +2733,23 @@ class MetricsTree_Cointime_Pricing:
|
|
|
2606
2733
|
"""Metrics tree node."""
|
|
2607
2734
|
|
|
2608
2735
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2609
|
-
self.active_price:
|
|
2736
|
+
self.active_price: ActivePricePattern = ActivePricePattern(client, 'active_price')
|
|
2610
2737
|
self.active_price_ratio: ActivePriceRatioPattern = ActivePriceRatioPattern(client, 'active_price_ratio')
|
|
2611
|
-
self.cointime_price:
|
|
2738
|
+
self.cointime_price: ActivePricePattern = ActivePricePattern(client, 'cointime_price')
|
|
2612
2739
|
self.cointime_price_ratio: ActivePriceRatioPattern = ActivePriceRatioPattern(client, 'cointime_price_ratio')
|
|
2613
|
-
self.true_market_mean:
|
|
2740
|
+
self.true_market_mean: ActivePricePattern = ActivePricePattern(client, 'true_market_mean')
|
|
2614
2741
|
self.true_market_mean_ratio: ActivePriceRatioPattern = ActivePriceRatioPattern(client, 'true_market_mean_ratio')
|
|
2615
|
-
self.vaulted_price:
|
|
2742
|
+
self.vaulted_price: ActivePricePattern = ActivePricePattern(client, 'vaulted_price')
|
|
2616
2743
|
self.vaulted_price_ratio: ActivePriceRatioPattern = ActivePriceRatioPattern(client, 'vaulted_price_ratio')
|
|
2617
2744
|
|
|
2745
|
+
class MetricsTree_Cointime_ReserveRisk:
|
|
2746
|
+
"""Metrics tree node."""
|
|
2747
|
+
|
|
2748
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2749
|
+
self.hodl_bank: MetricPattern6[StoredF64] = MetricPattern6(client, 'hodl_bank')
|
|
2750
|
+
self.reserve_risk: MetricPattern4[StoredF64] = MetricPattern4(client, 'reserve_risk')
|
|
2751
|
+
self.vocdd_365d_sma: MetricPattern6[StoredF64] = MetricPattern6(client, 'vocdd_365d_sma')
|
|
2752
|
+
|
|
2618
2753
|
class MetricsTree_Cointime_Supply:
|
|
2619
2754
|
"""Metrics tree node."""
|
|
2620
2755
|
|
|
@@ -2629,6 +2764,7 @@ class MetricsTree_Cointime_Value:
|
|
|
2629
2764
|
self.cointime_value_created: BlockCountPattern[StoredF64] = BlockCountPattern(client, 'cointime_value_created')
|
|
2630
2765
|
self.cointime_value_destroyed: BlockCountPattern[StoredF64] = BlockCountPattern(client, 'cointime_value_destroyed')
|
|
2631
2766
|
self.cointime_value_stored: BlockCountPattern[StoredF64] = BlockCountPattern(client, 'cointime_value_stored')
|
|
2767
|
+
self.vocdd: BlockCountPattern[StoredF64] = BlockCountPattern(client, 'vocdd')
|
|
2632
2768
|
|
|
2633
2769
|
class MetricsTree_Cointime:
|
|
2634
2770
|
"""Metrics tree node."""
|
|
@@ -2638,6 +2774,7 @@ class MetricsTree_Cointime:
|
|
|
2638
2774
|
self.adjusted: MetricsTree_Cointime_Adjusted = MetricsTree_Cointime_Adjusted(client)
|
|
2639
2775
|
self.cap: MetricsTree_Cointime_Cap = MetricsTree_Cointime_Cap(client)
|
|
2640
2776
|
self.pricing: MetricsTree_Cointime_Pricing = MetricsTree_Cointime_Pricing(client)
|
|
2777
|
+
self.reserve_risk: MetricsTree_Cointime_ReserveRisk = MetricsTree_Cointime_ReserveRisk(client)
|
|
2641
2778
|
self.supply: MetricsTree_Cointime_Supply = MetricsTree_Cointime_Supply(client)
|
|
2642
2779
|
self.value: MetricsTree_Cointime_Value = MetricsTree_Cointime_Value(client)
|
|
2643
2780
|
|
|
@@ -2659,10 +2796,24 @@ class MetricsTree_Constants:
|
|
|
2659
2796
|
self.constant_61_8: MetricPattern1[StoredF32] = MetricPattern1(client, 'constant_61_8')
|
|
2660
2797
|
self.constant_70: MetricPattern1[StoredU16] = MetricPattern1(client, 'constant_70')
|
|
2661
2798
|
self.constant_80: MetricPattern1[StoredU16] = MetricPattern1(client, 'constant_80')
|
|
2662
|
-
self.constant_minus_1: MetricPattern1[
|
|
2663
|
-
self.constant_minus_2: MetricPattern1[
|
|
2664
|
-
self.constant_minus_3: MetricPattern1[
|
|
2665
|
-
self.constant_minus_4: MetricPattern1[
|
|
2799
|
+
self.constant_minus_1: MetricPattern1[StoredI8] = MetricPattern1(client, 'constant_minus_1')
|
|
2800
|
+
self.constant_minus_2: MetricPattern1[StoredI8] = MetricPattern1(client, 'constant_minus_2')
|
|
2801
|
+
self.constant_minus_3: MetricPattern1[StoredI8] = MetricPattern1(client, 'constant_minus_3')
|
|
2802
|
+
self.constant_minus_4: MetricPattern1[StoredI8] = MetricPattern1(client, 'constant_minus_4')
|
|
2803
|
+
|
|
2804
|
+
class MetricsTree_Distribution_AddressActivity:
|
|
2805
|
+
"""Metrics tree node."""
|
|
2806
|
+
|
|
2807
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2808
|
+
self.all: AllPattern = AllPattern(client, 'address_activity')
|
|
2809
|
+
self.p2a: AllPattern = AllPattern(client, 'p2a_address_activity')
|
|
2810
|
+
self.p2pk33: AllPattern = AllPattern(client, 'p2pk33_address_activity')
|
|
2811
|
+
self.p2pk65: AllPattern = AllPattern(client, 'p2pk65_address_activity')
|
|
2812
|
+
self.p2pkh: AllPattern = AllPattern(client, 'p2pkh_address_activity')
|
|
2813
|
+
self.p2sh: AllPattern = AllPattern(client, 'p2sh_address_activity')
|
|
2814
|
+
self.p2tr: AllPattern = AllPattern(client, 'p2tr_address_activity')
|
|
2815
|
+
self.p2wpkh: AllPattern = AllPattern(client, 'p2wpkh_address_activity')
|
|
2816
|
+
self.p2wsh: AllPattern = AllPattern(client, 'p2wsh_address_activity')
|
|
2666
2817
|
|
|
2667
2818
|
class MetricsTree_Distribution_AddressCohorts_AmountRange:
|
|
2668
2819
|
"""Metrics tree node."""
|
|
@@ -2688,19 +2839,19 @@ class MetricsTree_Distribution_AddressCohorts_GeAmount:
|
|
|
2688
2839
|
"""Metrics tree node."""
|
|
2689
2840
|
|
|
2690
2841
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2691
|
-
self._100btc: _0satsPattern = _0satsPattern(client, '
|
|
2692
|
-
self._100k_sats: _0satsPattern = _0satsPattern(client, '
|
|
2693
|
-
self._100sats: _0satsPattern = _0satsPattern(client, '
|
|
2694
|
-
self._10btc: _0satsPattern = _0satsPattern(client, '
|
|
2695
|
-
self._10k_btc: _0satsPattern = _0satsPattern(client, '
|
|
2696
|
-
self._10k_sats: _0satsPattern = _0satsPattern(client, '
|
|
2697
|
-
self._10m_sats: _0satsPattern = _0satsPattern(client, '
|
|
2698
|
-
self._10sats: _0satsPattern = _0satsPattern(client, '
|
|
2699
|
-
self._1btc: _0satsPattern = _0satsPattern(client, '
|
|
2700
|
-
self._1k_btc: _0satsPattern = _0satsPattern(client, '
|
|
2701
|
-
self._1k_sats: _0satsPattern = _0satsPattern(client, '
|
|
2702
|
-
self._1m_sats: _0satsPattern = _0satsPattern(client, '
|
|
2703
|
-
self._1sat: _0satsPattern = _0satsPattern(client, '
|
|
2842
|
+
self._100btc: _0satsPattern = _0satsPattern(client, 'addrs_over_100btc')
|
|
2843
|
+
self._100k_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_100k_sats')
|
|
2844
|
+
self._100sats: _0satsPattern = _0satsPattern(client, 'addrs_over_100sats')
|
|
2845
|
+
self._10btc: _0satsPattern = _0satsPattern(client, 'addrs_over_10btc')
|
|
2846
|
+
self._10k_btc: _0satsPattern = _0satsPattern(client, 'addrs_over_10k_btc')
|
|
2847
|
+
self._10k_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_10k_sats')
|
|
2848
|
+
self._10m_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_10m_sats')
|
|
2849
|
+
self._10sats: _0satsPattern = _0satsPattern(client, 'addrs_over_10sats')
|
|
2850
|
+
self._1btc: _0satsPattern = _0satsPattern(client, 'addrs_over_1btc')
|
|
2851
|
+
self._1k_btc: _0satsPattern = _0satsPattern(client, 'addrs_over_1k_btc')
|
|
2852
|
+
self._1k_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_1k_sats')
|
|
2853
|
+
self._1m_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_1m_sats')
|
|
2854
|
+
self._1sat: _0satsPattern = _0satsPattern(client, 'addrs_over_1sat')
|
|
2704
2855
|
|
|
2705
2856
|
class MetricsTree_Distribution_AddressCohorts_LtAmount:
|
|
2706
2857
|
"""Metrics tree node."""
|
|
@@ -2748,38 +2899,66 @@ class MetricsTree_Distribution_AnyAddressIndexes:
|
|
|
2748
2899
|
self.p2wpkh: MetricPattern23[AnyAddressIndex] = MetricPattern23(client, 'anyaddressindex')
|
|
2749
2900
|
self.p2wsh: MetricPattern24[AnyAddressIndex] = MetricPattern24(client, 'anyaddressindex')
|
|
2750
2901
|
|
|
2902
|
+
class MetricsTree_Distribution_GrowthRate:
|
|
2903
|
+
"""Metrics tree node."""
|
|
2904
|
+
|
|
2905
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2906
|
+
self.all: FullnessPattern[StoredF32] = FullnessPattern(client, 'growth_rate')
|
|
2907
|
+
self.p2a: FullnessPattern[StoredF32] = FullnessPattern(client, 'p2a_growth_rate')
|
|
2908
|
+
self.p2pk33: FullnessPattern[StoredF32] = FullnessPattern(client, 'p2pk33_growth_rate')
|
|
2909
|
+
self.p2pk65: FullnessPattern[StoredF32] = FullnessPattern(client, 'p2pk65_growth_rate')
|
|
2910
|
+
self.p2pkh: FullnessPattern[StoredF32] = FullnessPattern(client, 'p2pkh_growth_rate')
|
|
2911
|
+
self.p2sh: FullnessPattern[StoredF32] = FullnessPattern(client, 'p2sh_growth_rate')
|
|
2912
|
+
self.p2tr: FullnessPattern[StoredF32] = FullnessPattern(client, 'p2tr_growth_rate')
|
|
2913
|
+
self.p2wpkh: FullnessPattern[StoredF32] = FullnessPattern(client, 'p2wpkh_growth_rate')
|
|
2914
|
+
self.p2wsh: FullnessPattern[StoredF32] = FullnessPattern(client, 'p2wsh_growth_rate')
|
|
2915
|
+
|
|
2916
|
+
class MetricsTree_Distribution_NewAddrCount:
|
|
2917
|
+
"""Metrics tree node."""
|
|
2918
|
+
|
|
2919
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2920
|
+
self.all: DollarsPattern[StoredU64] = DollarsPattern(client, 'new_addr_count')
|
|
2921
|
+
self.p2a: DollarsPattern[StoredU64] = DollarsPattern(client, 'p2a_new_addr_count')
|
|
2922
|
+
self.p2pk33: DollarsPattern[StoredU64] = DollarsPattern(client, 'p2pk33_new_addr_count')
|
|
2923
|
+
self.p2pk65: DollarsPattern[StoredU64] = DollarsPattern(client, 'p2pk65_new_addr_count')
|
|
2924
|
+
self.p2pkh: DollarsPattern[StoredU64] = DollarsPattern(client, 'p2pkh_new_addr_count')
|
|
2925
|
+
self.p2sh: DollarsPattern[StoredU64] = DollarsPattern(client, 'p2sh_new_addr_count')
|
|
2926
|
+
self.p2tr: DollarsPattern[StoredU64] = DollarsPattern(client, 'p2tr_new_addr_count')
|
|
2927
|
+
self.p2wpkh: DollarsPattern[StoredU64] = DollarsPattern(client, 'p2wpkh_new_addr_count')
|
|
2928
|
+
self.p2wsh: DollarsPattern[StoredU64] = DollarsPattern(client, 'p2wsh_new_addr_count')
|
|
2929
|
+
|
|
2751
2930
|
class MetricsTree_Distribution_UtxoCohorts_AgeRange:
|
|
2752
2931
|
"""Metrics tree node."""
|
|
2753
2932
|
|
|
2754
2933
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2755
|
-
self._10y_to_12y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2756
|
-
self._12y_to_15y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2757
|
-
self._1d_to_1w: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2758
|
-
self._1h_to_1d: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2759
|
-
self._1m_to_2m: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2760
|
-
self._1w_to_1m: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2761
|
-
self._1y_to_2y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2762
|
-
self._2m_to_3m: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2763
|
-
self._2y_to_3y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2764
|
-
self._3m_to_4m: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2765
|
-
self._3y_to_4y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2766
|
-
self._4m_to_5m: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2767
|
-
self._4y_to_5y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2768
|
-
self._5m_to_6m: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2769
|
-
self._5y_to_6y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2770
|
-
self._6m_to_1y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2771
|
-
self._6y_to_7y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2772
|
-
self._7y_to_8y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2773
|
-
self._8y_to_10y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2774
|
-
self.from_15y: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2775
|
-
self.up_to_1h: _10yTo12yPattern = _10yTo12yPattern(client, '
|
|
2934
|
+
self._10y_to_12y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_10y_to_12y_old')
|
|
2935
|
+
self._12y_to_15y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_12y_to_15y_old')
|
|
2936
|
+
self._1d_to_1w: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1d_to_1w_old')
|
|
2937
|
+
self._1h_to_1d: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1h_to_1d_old')
|
|
2938
|
+
self._1m_to_2m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1m_to_2m_old')
|
|
2939
|
+
self._1w_to_1m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1w_to_1m_old')
|
|
2940
|
+
self._1y_to_2y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1y_to_2y_old')
|
|
2941
|
+
self._2m_to_3m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_2m_to_3m_old')
|
|
2942
|
+
self._2y_to_3y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_2y_to_3y_old')
|
|
2943
|
+
self._3m_to_4m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_3m_to_4m_old')
|
|
2944
|
+
self._3y_to_4y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_3y_to_4y_old')
|
|
2945
|
+
self._4m_to_5m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_4m_to_5m_old')
|
|
2946
|
+
self._4y_to_5y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_4y_to_5y_old')
|
|
2947
|
+
self._5m_to_6m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_5m_to_6m_old')
|
|
2948
|
+
self._5y_to_6y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_5y_to_6y_old')
|
|
2949
|
+
self._6m_to_1y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_6m_to_1y_old')
|
|
2950
|
+
self._6y_to_7y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_6y_to_7y_old')
|
|
2951
|
+
self._7y_to_8y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_7y_to_8y_old')
|
|
2952
|
+
self._8y_to_10y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_8y_to_10y_old')
|
|
2953
|
+
self.from_15y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_over_15y_old')
|
|
2954
|
+
self.up_to_1h: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_under_1h_old')
|
|
2776
2955
|
|
|
2777
2956
|
class MetricsTree_Distribution_UtxoCohorts_All_CostBasis:
|
|
2778
2957
|
"""Metrics tree node."""
|
|
2779
2958
|
|
|
2780
2959
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2781
|
-
self.max:
|
|
2782
|
-
self.min:
|
|
2960
|
+
self.max: ActivePricePattern = ActivePricePattern(client, 'max_cost_basis')
|
|
2961
|
+
self.min: ActivePricePattern = ActivePricePattern(client, 'min_cost_basis')
|
|
2783
2962
|
self.percentiles: PercentilesPattern = PercentilesPattern(client, 'cost_basis')
|
|
2784
2963
|
|
|
2785
2964
|
class MetricsTree_Distribution_UtxoCohorts_All_Relative:
|
|
@@ -2839,19 +3018,19 @@ class MetricsTree_Distribution_UtxoCohorts_GeAmount:
|
|
|
2839
3018
|
"""Metrics tree node."""
|
|
2840
3019
|
|
|
2841
3020
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2842
|
-
self._100btc: _100btcPattern = _100btcPattern(client, '
|
|
2843
|
-
self._100k_sats: _100btcPattern = _100btcPattern(client, '
|
|
2844
|
-
self._100sats: _100btcPattern = _100btcPattern(client, '
|
|
2845
|
-
self._10btc: _100btcPattern = _100btcPattern(client, '
|
|
2846
|
-
self._10k_btc: _100btcPattern = _100btcPattern(client, '
|
|
2847
|
-
self._10k_sats: _100btcPattern = _100btcPattern(client, '
|
|
2848
|
-
self._10m_sats: _100btcPattern = _100btcPattern(client, '
|
|
2849
|
-
self._10sats: _100btcPattern = _100btcPattern(client, '
|
|
2850
|
-
self._1btc: _100btcPattern = _100btcPattern(client, '
|
|
2851
|
-
self._1k_btc: _100btcPattern = _100btcPattern(client, '
|
|
2852
|
-
self._1k_sats: _100btcPattern = _100btcPattern(client, '
|
|
2853
|
-
self._1m_sats: _100btcPattern = _100btcPattern(client, '
|
|
2854
|
-
self._1sat: _100btcPattern = _100btcPattern(client, '
|
|
3021
|
+
self._100btc: _100btcPattern = _100btcPattern(client, 'utxos_over_100btc')
|
|
3022
|
+
self._100k_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_100k_sats')
|
|
3023
|
+
self._100sats: _100btcPattern = _100btcPattern(client, 'utxos_over_100sats')
|
|
3024
|
+
self._10btc: _100btcPattern = _100btcPattern(client, 'utxos_over_10btc')
|
|
3025
|
+
self._10k_btc: _100btcPattern = _100btcPattern(client, 'utxos_over_10k_btc')
|
|
3026
|
+
self._10k_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_10k_sats')
|
|
3027
|
+
self._10m_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_10m_sats')
|
|
3028
|
+
self._10sats: _100btcPattern = _100btcPattern(client, 'utxos_over_10sats')
|
|
3029
|
+
self._1btc: _100btcPattern = _100btcPattern(client, 'utxos_over_1btc')
|
|
3030
|
+
self._1k_btc: _100btcPattern = _100btcPattern(client, 'utxos_over_1k_btc')
|
|
3031
|
+
self._1k_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_1k_sats')
|
|
3032
|
+
self._1m_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_1m_sats')
|
|
3033
|
+
self._1sat: _100btcPattern = _100btcPattern(client, 'utxos_over_1sat')
|
|
2855
3034
|
|
|
2856
3035
|
class MetricsTree_Distribution_UtxoCohorts_LtAmount:
|
|
2857
3036
|
"""Metrics tree node."""
|
|
@@ -2875,47 +3054,47 @@ class MetricsTree_Distribution_UtxoCohorts_MaxAge:
|
|
|
2875
3054
|
"""Metrics tree node."""
|
|
2876
3055
|
|
|
2877
3056
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2878
|
-
self._10y: _10yPattern = _10yPattern(client, '
|
|
2879
|
-
self._12y: _10yPattern = _10yPattern(client, '
|
|
2880
|
-
self._15y: _10yPattern = _10yPattern(client, '
|
|
2881
|
-
self._1m: _10yPattern = _10yPattern(client, '
|
|
2882
|
-
self._1w: _10yPattern = _10yPattern(client, '
|
|
2883
|
-
self._1y: _10yPattern = _10yPattern(client, '
|
|
2884
|
-
self._2m: _10yPattern = _10yPattern(client, '
|
|
2885
|
-
self._2y: _10yPattern = _10yPattern(client, '
|
|
2886
|
-
self._3m: _10yPattern = _10yPattern(client, '
|
|
2887
|
-
self._3y: _10yPattern = _10yPattern(client, '
|
|
2888
|
-
self._4m: _10yPattern = _10yPattern(client, '
|
|
2889
|
-
self._4y: _10yPattern = _10yPattern(client, '
|
|
2890
|
-
self._5m: _10yPattern = _10yPattern(client, '
|
|
2891
|
-
self._5y: _10yPattern = _10yPattern(client, '
|
|
2892
|
-
self._6m: _10yPattern = _10yPattern(client, '
|
|
2893
|
-
self._6y: _10yPattern = _10yPattern(client, '
|
|
2894
|
-
self._7y: _10yPattern = _10yPattern(client, '
|
|
2895
|
-
self._8y: _10yPattern = _10yPattern(client, '
|
|
3057
|
+
self._10y: _10yPattern = _10yPattern(client, 'utxos_under_10y_old')
|
|
3058
|
+
self._12y: _10yPattern = _10yPattern(client, 'utxos_under_12y_old')
|
|
3059
|
+
self._15y: _10yPattern = _10yPattern(client, 'utxos_under_15y_old')
|
|
3060
|
+
self._1m: _10yPattern = _10yPattern(client, 'utxos_under_1m_old')
|
|
3061
|
+
self._1w: _10yPattern = _10yPattern(client, 'utxos_under_1w_old')
|
|
3062
|
+
self._1y: _10yPattern = _10yPattern(client, 'utxos_under_1y_old')
|
|
3063
|
+
self._2m: _10yPattern = _10yPattern(client, 'utxos_under_2m_old')
|
|
3064
|
+
self._2y: _10yPattern = _10yPattern(client, 'utxos_under_2y_old')
|
|
3065
|
+
self._3m: _10yPattern = _10yPattern(client, 'utxos_under_3m_old')
|
|
3066
|
+
self._3y: _10yPattern = _10yPattern(client, 'utxos_under_3y_old')
|
|
3067
|
+
self._4m: _10yPattern = _10yPattern(client, 'utxos_under_4m_old')
|
|
3068
|
+
self._4y: _10yPattern = _10yPattern(client, 'utxos_under_4y_old')
|
|
3069
|
+
self._5m: _10yPattern = _10yPattern(client, 'utxos_under_5m_old')
|
|
3070
|
+
self._5y: _10yPattern = _10yPattern(client, 'utxos_under_5y_old')
|
|
3071
|
+
self._6m: _10yPattern = _10yPattern(client, 'utxos_under_6m_old')
|
|
3072
|
+
self._6y: _10yPattern = _10yPattern(client, 'utxos_under_6y_old')
|
|
3073
|
+
self._7y: _10yPattern = _10yPattern(client, 'utxos_under_7y_old')
|
|
3074
|
+
self._8y: _10yPattern = _10yPattern(client, 'utxos_under_8y_old')
|
|
2896
3075
|
|
|
2897
3076
|
class MetricsTree_Distribution_UtxoCohorts_MinAge:
|
|
2898
3077
|
"""Metrics tree node."""
|
|
2899
3078
|
|
|
2900
3079
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
2901
|
-
self._10y: _100btcPattern = _100btcPattern(client, '
|
|
2902
|
-
self._12y: _100btcPattern = _100btcPattern(client, '
|
|
2903
|
-
self._1d: _100btcPattern = _100btcPattern(client, '
|
|
2904
|
-
self._1m: _100btcPattern = _100btcPattern(client, '
|
|
2905
|
-
self._1w: _100btcPattern = _100btcPattern(client, '
|
|
2906
|
-
self._1y: _100btcPattern = _100btcPattern(client, '
|
|
2907
|
-
self._2m: _100btcPattern = _100btcPattern(client, '
|
|
2908
|
-
self._2y: _100btcPattern = _100btcPattern(client, '
|
|
2909
|
-
self._3m: _100btcPattern = _100btcPattern(client, '
|
|
2910
|
-
self._3y: _100btcPattern = _100btcPattern(client, '
|
|
2911
|
-
self._4m: _100btcPattern = _100btcPattern(client, '
|
|
2912
|
-
self._4y: _100btcPattern = _100btcPattern(client, '
|
|
2913
|
-
self._5m: _100btcPattern = _100btcPattern(client, '
|
|
2914
|
-
self._5y: _100btcPattern = _100btcPattern(client, '
|
|
2915
|
-
self._6m: _100btcPattern = _100btcPattern(client, '
|
|
2916
|
-
self._6y: _100btcPattern = _100btcPattern(client, '
|
|
2917
|
-
self._7y: _100btcPattern = _100btcPattern(client, '
|
|
2918
|
-
self._8y: _100btcPattern = _100btcPattern(client, '
|
|
3080
|
+
self._10y: _100btcPattern = _100btcPattern(client, 'utxos_over_10y_old')
|
|
3081
|
+
self._12y: _100btcPattern = _100btcPattern(client, 'utxos_over_12y_old')
|
|
3082
|
+
self._1d: _100btcPattern = _100btcPattern(client, 'utxos_over_1d_old')
|
|
3083
|
+
self._1m: _100btcPattern = _100btcPattern(client, 'utxos_over_1m_old')
|
|
3084
|
+
self._1w: _100btcPattern = _100btcPattern(client, 'utxos_over_1w_old')
|
|
3085
|
+
self._1y: _100btcPattern = _100btcPattern(client, 'utxos_over_1y_old')
|
|
3086
|
+
self._2m: _100btcPattern = _100btcPattern(client, 'utxos_over_2m_old')
|
|
3087
|
+
self._2y: _100btcPattern = _100btcPattern(client, 'utxos_over_2y_old')
|
|
3088
|
+
self._3m: _100btcPattern = _100btcPattern(client, 'utxos_over_3m_old')
|
|
3089
|
+
self._3y: _100btcPattern = _100btcPattern(client, 'utxos_over_3y_old')
|
|
3090
|
+
self._4m: _100btcPattern = _100btcPattern(client, 'utxos_over_4m_old')
|
|
3091
|
+
self._4y: _100btcPattern = _100btcPattern(client, 'utxos_over_4y_old')
|
|
3092
|
+
self._5m: _100btcPattern = _100btcPattern(client, 'utxos_over_5m_old')
|
|
3093
|
+
self._5y: _100btcPattern = _100btcPattern(client, 'utxos_over_5y_old')
|
|
3094
|
+
self._6m: _100btcPattern = _100btcPattern(client, 'utxos_over_6m_old')
|
|
3095
|
+
self._6y: _100btcPattern = _100btcPattern(client, 'utxos_over_6y_old')
|
|
3096
|
+
self._7y: _100btcPattern = _100btcPattern(client, 'utxos_over_7y_old')
|
|
3097
|
+
self._8y: _100btcPattern = _100btcPattern(client, 'utxos_over_8y_old')
|
|
2919
3098
|
|
|
2920
3099
|
class MetricsTree_Distribution_UtxoCohorts_Term_Long:
|
|
2921
3100
|
"""Metrics tree node."""
|
|
@@ -3008,13 +3187,17 @@ class MetricsTree_Distribution:
|
|
|
3008
3187
|
|
|
3009
3188
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3010
3189
|
self.addr_count: AddrCountPattern = AddrCountPattern(client, 'addr_count')
|
|
3190
|
+
self.address_activity: MetricsTree_Distribution_AddressActivity = MetricsTree_Distribution_AddressActivity(client)
|
|
3011
3191
|
self.address_cohorts: MetricsTree_Distribution_AddressCohorts = MetricsTree_Distribution_AddressCohorts(client)
|
|
3012
3192
|
self.addresses_data: MetricsTree_Distribution_AddressesData = MetricsTree_Distribution_AddressesData(client)
|
|
3013
3193
|
self.any_address_indexes: MetricsTree_Distribution_AnyAddressIndexes = MetricsTree_Distribution_AnyAddressIndexes(client)
|
|
3014
3194
|
self.chain_state: MetricPattern11[SupplyState] = MetricPattern11(client, 'chain')
|
|
3015
3195
|
self.empty_addr_count: AddrCountPattern = AddrCountPattern(client, 'empty_addr_count')
|
|
3016
3196
|
self.emptyaddressindex: MetricPattern32[EmptyAddressIndex] = MetricPattern32(client, 'emptyaddressindex')
|
|
3197
|
+
self.growth_rate: MetricsTree_Distribution_GrowthRate = MetricsTree_Distribution_GrowthRate(client)
|
|
3017
3198
|
self.loadedaddressindex: MetricPattern31[LoadedAddressIndex] = MetricPattern31(client, 'loadedaddressindex')
|
|
3199
|
+
self.new_addr_count: MetricsTree_Distribution_NewAddrCount = MetricsTree_Distribution_NewAddrCount(client)
|
|
3200
|
+
self.total_addr_count: AddrCountPattern = AddrCountPattern(client, 'total_addr_count')
|
|
3018
3201
|
self.utxo_cohorts: MetricsTree_Distribution_UtxoCohorts = MetricsTree_Distribution_UtxoCohorts(client)
|
|
3019
3202
|
|
|
3020
3203
|
class MetricsTree_Indexes_Address_Empty:
|
|
@@ -3265,7 +3448,7 @@ class MetricsTree_Market_Ath:
|
|
|
3265
3448
|
self.days_since_price_ath: MetricPattern4[StoredU16] = MetricPattern4(client, 'days_since_price_ath')
|
|
3266
3449
|
self.max_days_between_price_aths: MetricPattern4[StoredU16] = MetricPattern4(client, 'max_days_between_price_aths')
|
|
3267
3450
|
self.max_years_between_price_aths: MetricPattern4[StoredF32] = MetricPattern4(client, 'max_years_between_price_aths')
|
|
3268
|
-
self.price_ath:
|
|
3451
|
+
self.price_ath: ActivePricePattern = ActivePricePattern(client, 'price_ath')
|
|
3269
3452
|
self.price_drawdown: MetricPattern3[StoredF32] = MetricPattern3(client, 'price_drawdown')
|
|
3270
3453
|
self.years_since_price_ath: MetricPattern4[StoredF32] = MetricPattern4(client, 'years_since_price_ath')
|
|
3271
3454
|
|
|
@@ -3273,17 +3456,86 @@ class MetricsTree_Market_Dca_ClassAveragePrice:
|
|
|
3273
3456
|
"""Metrics tree node."""
|
|
3274
3457
|
|
|
3275
3458
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3276
|
-
self._2015:
|
|
3277
|
-
self._2016:
|
|
3278
|
-
self._2017:
|
|
3279
|
-
self._2018:
|
|
3280
|
-
self._2019:
|
|
3281
|
-
self._2020:
|
|
3282
|
-
self._2021:
|
|
3283
|
-
self._2022:
|
|
3284
|
-
self._2023:
|
|
3285
|
-
self._2024:
|
|
3286
|
-
self._2025:
|
|
3459
|
+
self._2015: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2015_average_price')
|
|
3460
|
+
self._2016: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2016_average_price')
|
|
3461
|
+
self._2017: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2017_average_price')
|
|
3462
|
+
self._2018: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2018_average_price')
|
|
3463
|
+
self._2019: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2019_average_price')
|
|
3464
|
+
self._2020: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2020_average_price')
|
|
3465
|
+
self._2021: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2021_average_price')
|
|
3466
|
+
self._2022: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2022_average_price')
|
|
3467
|
+
self._2023: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2023_average_price')
|
|
3468
|
+
self._2024: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2024_average_price')
|
|
3469
|
+
self._2025: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2025_average_price')
|
|
3470
|
+
self._2026: _0sdUsdPattern = _0sdUsdPattern(client, 'dca_class_2026_average_price')
|
|
3471
|
+
|
|
3472
|
+
class MetricsTree_Market_Dca_ClassDaysInLoss:
|
|
3473
|
+
"""Metrics tree node."""
|
|
3474
|
+
|
|
3475
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3476
|
+
self._2015: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2015_days_in_loss')
|
|
3477
|
+
self._2016: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2016_days_in_loss')
|
|
3478
|
+
self._2017: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2017_days_in_loss')
|
|
3479
|
+
self._2018: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2018_days_in_loss')
|
|
3480
|
+
self._2019: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2019_days_in_loss')
|
|
3481
|
+
self._2020: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2020_days_in_loss')
|
|
3482
|
+
self._2021: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2021_days_in_loss')
|
|
3483
|
+
self._2022: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2022_days_in_loss')
|
|
3484
|
+
self._2023: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2023_days_in_loss')
|
|
3485
|
+
self._2024: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2024_days_in_loss')
|
|
3486
|
+
self._2025: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2025_days_in_loss')
|
|
3487
|
+
self._2026: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2026_days_in_loss')
|
|
3488
|
+
|
|
3489
|
+
class MetricsTree_Market_Dca_ClassDaysInProfit:
|
|
3490
|
+
"""Metrics tree node."""
|
|
3491
|
+
|
|
3492
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3493
|
+
self._2015: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2015_days_in_profit')
|
|
3494
|
+
self._2016: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2016_days_in_profit')
|
|
3495
|
+
self._2017: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2017_days_in_profit')
|
|
3496
|
+
self._2018: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2018_days_in_profit')
|
|
3497
|
+
self._2019: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2019_days_in_profit')
|
|
3498
|
+
self._2020: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2020_days_in_profit')
|
|
3499
|
+
self._2021: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2021_days_in_profit')
|
|
3500
|
+
self._2022: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2022_days_in_profit')
|
|
3501
|
+
self._2023: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2023_days_in_profit')
|
|
3502
|
+
self._2024: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2024_days_in_profit')
|
|
3503
|
+
self._2025: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2025_days_in_profit')
|
|
3504
|
+
self._2026: MetricPattern4[StoredU32] = MetricPattern4(client, 'dca_class_2026_days_in_profit')
|
|
3505
|
+
|
|
3506
|
+
class MetricsTree_Market_Dca_ClassMaxDrawdown:
|
|
3507
|
+
"""Metrics tree node."""
|
|
3508
|
+
|
|
3509
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3510
|
+
self._2015: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2015_max_drawdown')
|
|
3511
|
+
self._2016: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2016_max_drawdown')
|
|
3512
|
+
self._2017: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2017_max_drawdown')
|
|
3513
|
+
self._2018: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2018_max_drawdown')
|
|
3514
|
+
self._2019: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2019_max_drawdown')
|
|
3515
|
+
self._2020: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2020_max_drawdown')
|
|
3516
|
+
self._2021: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2021_max_drawdown')
|
|
3517
|
+
self._2022: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2022_max_drawdown')
|
|
3518
|
+
self._2023: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2023_max_drawdown')
|
|
3519
|
+
self._2024: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2024_max_drawdown')
|
|
3520
|
+
self._2025: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2025_max_drawdown')
|
|
3521
|
+
self._2026: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2026_max_drawdown')
|
|
3522
|
+
|
|
3523
|
+
class MetricsTree_Market_Dca_ClassMaxReturn:
|
|
3524
|
+
"""Metrics tree node."""
|
|
3525
|
+
|
|
3526
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3527
|
+
self._2015: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2015_max_return')
|
|
3528
|
+
self._2016: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2016_max_return')
|
|
3529
|
+
self._2017: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2017_max_return')
|
|
3530
|
+
self._2018: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2018_max_return')
|
|
3531
|
+
self._2019: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2019_max_return')
|
|
3532
|
+
self._2020: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2020_max_return')
|
|
3533
|
+
self._2021: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2021_max_return')
|
|
3534
|
+
self._2022: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2022_max_return')
|
|
3535
|
+
self._2023: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2023_max_return')
|
|
3536
|
+
self._2024: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2024_max_return')
|
|
3537
|
+
self._2025: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2025_max_return')
|
|
3538
|
+
self._2026: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2026_max_return')
|
|
3287
3539
|
|
|
3288
3540
|
class MetricsTree_Market_Dca_ClassStack:
|
|
3289
3541
|
"""Metrics tree node."""
|
|
@@ -3300,18 +3552,49 @@ class MetricsTree_Market_Dca_ClassStack:
|
|
|
3300
3552
|
self._2023: _2015Pattern = _2015Pattern(client, 'dca_class_2023_stack')
|
|
3301
3553
|
self._2024: _2015Pattern = _2015Pattern(client, 'dca_class_2024_stack')
|
|
3302
3554
|
self._2025: _2015Pattern = _2015Pattern(client, 'dca_class_2025_stack')
|
|
3555
|
+
self._2026: _2015Pattern = _2015Pattern(client, 'dca_class_2026_stack')
|
|
3556
|
+
|
|
3557
|
+
class MetricsTree_Market_Dca_PeriodAveragePrice:
|
|
3558
|
+
"""Metrics tree node."""
|
|
3559
|
+
|
|
3560
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3561
|
+
self._10y: _0sdUsdPattern = _0sdUsdPattern(client, '10y_dca_average_price')
|
|
3562
|
+
self._1m: _0sdUsdPattern = _0sdUsdPattern(client, '1m_dca_average_price')
|
|
3563
|
+
self._1w: _0sdUsdPattern = _0sdUsdPattern(client, '1w_dca_average_price')
|
|
3564
|
+
self._1y: _0sdUsdPattern = _0sdUsdPattern(client, '1y_dca_average_price')
|
|
3565
|
+
self._2y: _0sdUsdPattern = _0sdUsdPattern(client, '2y_dca_average_price')
|
|
3566
|
+
self._3m: _0sdUsdPattern = _0sdUsdPattern(client, '3m_dca_average_price')
|
|
3567
|
+
self._3y: _0sdUsdPattern = _0sdUsdPattern(client, '3y_dca_average_price')
|
|
3568
|
+
self._4y: _0sdUsdPattern = _0sdUsdPattern(client, '4y_dca_average_price')
|
|
3569
|
+
self._5y: _0sdUsdPattern = _0sdUsdPattern(client, '5y_dca_average_price')
|
|
3570
|
+
self._6m: _0sdUsdPattern = _0sdUsdPattern(client, '6m_dca_average_price')
|
|
3571
|
+
self._6y: _0sdUsdPattern = _0sdUsdPattern(client, '6y_dca_average_price')
|
|
3572
|
+
self._8y: _0sdUsdPattern = _0sdUsdPattern(client, '8y_dca_average_price')
|
|
3303
3573
|
|
|
3304
3574
|
class MetricsTree_Market_Dca:
|
|
3305
3575
|
"""Metrics tree node."""
|
|
3306
3576
|
|
|
3307
3577
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3308
3578
|
self.class_average_price: MetricsTree_Market_Dca_ClassAveragePrice = MetricsTree_Market_Dca_ClassAveragePrice(client)
|
|
3309
|
-
self.
|
|
3579
|
+
self.class_days_in_loss: MetricsTree_Market_Dca_ClassDaysInLoss = MetricsTree_Market_Dca_ClassDaysInLoss(client)
|
|
3580
|
+
self.class_days_in_profit: MetricsTree_Market_Dca_ClassDaysInProfit = MetricsTree_Market_Dca_ClassDaysInProfit(client)
|
|
3581
|
+
self.class_max_drawdown: MetricsTree_Market_Dca_ClassMaxDrawdown = MetricsTree_Market_Dca_ClassMaxDrawdown(client)
|
|
3582
|
+
self.class_max_return: MetricsTree_Market_Dca_ClassMaxReturn = MetricsTree_Market_Dca_ClassMaxReturn(client)
|
|
3583
|
+
self.class_returns: ClassDaysInLossPattern[StoredF32] = ClassDaysInLossPattern(client, 'dca_class')
|
|
3310
3584
|
self.class_stack: MetricsTree_Market_Dca_ClassStack = MetricsTree_Market_Dca_ClassStack(client)
|
|
3311
|
-
self.period_average_price:
|
|
3585
|
+
self.period_average_price: MetricsTree_Market_Dca_PeriodAveragePrice = MetricsTree_Market_Dca_PeriodAveragePrice(client)
|
|
3312
3586
|
self.period_cagr: PeriodCagrPattern = PeriodCagrPattern(client, 'dca_cagr')
|
|
3587
|
+
self.period_days_in_loss: PeriodDaysInLossPattern[StoredU32] = PeriodDaysInLossPattern(client, 'dca_days_in_loss')
|
|
3588
|
+
self.period_days_in_profit: PeriodDaysInLossPattern[StoredU32] = PeriodDaysInLossPattern(client, 'dca_days_in_profit')
|
|
3589
|
+
self.period_lump_sum_days_in_loss: PeriodDaysInLossPattern[StoredU32] = PeriodDaysInLossPattern(client, 'lump_sum_days_in_loss')
|
|
3590
|
+
self.period_lump_sum_days_in_profit: PeriodDaysInLossPattern[StoredU32] = PeriodDaysInLossPattern(client, 'lump_sum_days_in_profit')
|
|
3591
|
+
self.period_lump_sum_max_drawdown: PeriodDaysInLossPattern[StoredF32] = PeriodDaysInLossPattern(client, 'lump_sum_max_drawdown')
|
|
3592
|
+
self.period_lump_sum_max_return: PeriodDaysInLossPattern[StoredF32] = PeriodDaysInLossPattern(client, 'lump_sum_max_return')
|
|
3593
|
+
self.period_lump_sum_returns: PeriodDaysInLossPattern[StoredF32] = PeriodDaysInLossPattern(client, 'lump_sum_returns')
|
|
3313
3594
|
self.period_lump_sum_stack: PeriodLumpSumStackPattern = PeriodLumpSumStackPattern(client, 'lump_sum_stack')
|
|
3314
|
-
self.
|
|
3595
|
+
self.period_max_drawdown: PeriodDaysInLossPattern[StoredF32] = PeriodDaysInLossPattern(client, 'dca_max_drawdown')
|
|
3596
|
+
self.period_max_return: PeriodDaysInLossPattern[StoredF32] = PeriodDaysInLossPattern(client, 'dca_max_return')
|
|
3597
|
+
self.period_returns: PeriodDaysInLossPattern[StoredF32] = PeriodDaysInLossPattern(client, 'dca_returns')
|
|
3315
3598
|
self.period_stack: PeriodLumpSumStackPattern = PeriodLumpSumStackPattern(client, 'dca_stack')
|
|
3316
3599
|
|
|
3317
3600
|
class MetricsTree_Market_Indicators:
|
|
@@ -3338,6 +3621,24 @@ class MetricsTree_Market_Indicators:
|
|
|
3338
3621
|
self.stoch_rsi_d: MetricPattern6[StoredF32] = MetricPattern6(client, 'stoch_rsi_d')
|
|
3339
3622
|
self.stoch_rsi_k: MetricPattern6[StoredF32] = MetricPattern6(client, 'stoch_rsi_k')
|
|
3340
3623
|
|
|
3624
|
+
class MetricsTree_Market_Lookback:
|
|
3625
|
+
"""Metrics tree node."""
|
|
3626
|
+
|
|
3627
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3628
|
+
self._10y: _0sdUsdPattern = _0sdUsdPattern(client, 'price_10y_ago')
|
|
3629
|
+
self._1d: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1d_ago')
|
|
3630
|
+
self._1m: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1m_ago')
|
|
3631
|
+
self._1w: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1w_ago')
|
|
3632
|
+
self._1y: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1y_ago')
|
|
3633
|
+
self._2y: _0sdUsdPattern = _0sdUsdPattern(client, 'price_2y_ago')
|
|
3634
|
+
self._3m: _0sdUsdPattern = _0sdUsdPattern(client, 'price_3m_ago')
|
|
3635
|
+
self._3y: _0sdUsdPattern = _0sdUsdPattern(client, 'price_3y_ago')
|
|
3636
|
+
self._4y: _0sdUsdPattern = _0sdUsdPattern(client, 'price_4y_ago')
|
|
3637
|
+
self._5y: _0sdUsdPattern = _0sdUsdPattern(client, 'price_5y_ago')
|
|
3638
|
+
self._6m: _0sdUsdPattern = _0sdUsdPattern(client, 'price_6m_ago')
|
|
3639
|
+
self._6y: _0sdUsdPattern = _0sdUsdPattern(client, 'price_6y_ago')
|
|
3640
|
+
self._8y: _0sdUsdPattern = _0sdUsdPattern(client, 'price_8y_ago')
|
|
3641
|
+
|
|
3341
3642
|
class MetricsTree_Market_MovingAverage:
|
|
3342
3643
|
"""Metrics tree node."""
|
|
3343
3644
|
|
|
@@ -3356,8 +3657,8 @@ class MetricsTree_Market_MovingAverage:
|
|
|
3356
3657
|
self.price_1y_sma: Price111dSmaPattern = Price111dSmaPattern(client, 'price_1y_sma')
|
|
3357
3658
|
self.price_200d_ema: Price111dSmaPattern = Price111dSmaPattern(client, 'price_200d_ema')
|
|
3358
3659
|
self.price_200d_sma: Price111dSmaPattern = Price111dSmaPattern(client, 'price_200d_sma')
|
|
3359
|
-
self.price_200d_sma_x0_8:
|
|
3360
|
-
self.price_200d_sma_x2_4:
|
|
3660
|
+
self.price_200d_sma_x0_8: _0sdUsdPattern = _0sdUsdPattern(client, 'price_200d_sma_x0_8')
|
|
3661
|
+
self.price_200d_sma_x2_4: _0sdUsdPattern = _0sdUsdPattern(client, 'price_200d_sma_x2_4')
|
|
3361
3662
|
self.price_200w_ema: Price111dSmaPattern = Price111dSmaPattern(client, 'price_200w_ema')
|
|
3362
3663
|
self.price_200w_sma: Price111dSmaPattern = Price111dSmaPattern(client, 'price_200w_sma')
|
|
3363
3664
|
self.price_21d_ema: Price111dSmaPattern = Price111dSmaPattern(client, 'price_21d_ema')
|
|
@@ -3368,7 +3669,7 @@ class MetricsTree_Market_MovingAverage:
|
|
|
3368
3669
|
self.price_34d_ema: Price111dSmaPattern = Price111dSmaPattern(client, 'price_34d_ema')
|
|
3369
3670
|
self.price_34d_sma: Price111dSmaPattern = Price111dSmaPattern(client, 'price_34d_sma')
|
|
3370
3671
|
self.price_350d_sma: Price111dSmaPattern = Price111dSmaPattern(client, 'price_350d_sma')
|
|
3371
|
-
self.price_350d_sma_x2:
|
|
3672
|
+
self.price_350d_sma_x2: _0sdUsdPattern = _0sdUsdPattern(client, 'price_350d_sma_x2')
|
|
3372
3673
|
self.price_4y_ema: Price111dSmaPattern = Price111dSmaPattern(client, 'price_4y_ema')
|
|
3373
3674
|
self.price_4y_sma: Price111dSmaPattern = Price111dSmaPattern(client, 'price_4y_sma')
|
|
3374
3675
|
self.price_55d_ema: Price111dSmaPattern = Price111dSmaPattern(client, 'price_55d_ema')
|
|
@@ -3382,15 +3683,15 @@ class MetricsTree_Market_Range:
|
|
|
3382
3683
|
"""Metrics tree node."""
|
|
3383
3684
|
|
|
3384
3685
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3385
|
-
self.price_1m_max:
|
|
3386
|
-
self.price_1m_min:
|
|
3387
|
-
self.price_1w_max:
|
|
3388
|
-
self.price_1w_min:
|
|
3389
|
-
self.price_1y_max:
|
|
3390
|
-
self.price_1y_min:
|
|
3686
|
+
self.price_1m_max: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1m_max')
|
|
3687
|
+
self.price_1m_min: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1m_min')
|
|
3688
|
+
self.price_1w_max: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1w_max')
|
|
3689
|
+
self.price_1w_min: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1w_min')
|
|
3690
|
+
self.price_1y_max: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1y_max')
|
|
3691
|
+
self.price_1y_min: _0sdUsdPattern = _0sdUsdPattern(client, 'price_1y_min')
|
|
3391
3692
|
self.price_2w_choppiness_index: MetricPattern4[StoredF32] = MetricPattern4(client, 'price_2w_choppiness_index')
|
|
3392
|
-
self.price_2w_max:
|
|
3393
|
-
self.price_2w_min:
|
|
3693
|
+
self.price_2w_max: _0sdUsdPattern = _0sdUsdPattern(client, 'price_2w_max')
|
|
3694
|
+
self.price_2w_min: _0sdUsdPattern = _0sdUsdPattern(client, 'price_2w_min')
|
|
3394
3695
|
self.price_true_range: MetricPattern6[StoredF32] = MetricPattern6(client, 'price_true_range')
|
|
3395
3696
|
self.price_true_range_2w_sum: MetricPattern6[StoredF32] = MetricPattern6(client, 'price_true_range_2w_sum')
|
|
3396
3697
|
|
|
@@ -3447,7 +3748,7 @@ class MetricsTree_Market:
|
|
|
3447
3748
|
self.ath: MetricsTree_Market_Ath = MetricsTree_Market_Ath(client)
|
|
3448
3749
|
self.dca: MetricsTree_Market_Dca = MetricsTree_Market_Dca(client)
|
|
3449
3750
|
self.indicators: MetricsTree_Market_Indicators = MetricsTree_Market_Indicators(client)
|
|
3450
|
-
self.lookback:
|
|
3751
|
+
self.lookback: MetricsTree_Market_Lookback = MetricsTree_Market_Lookback(client)
|
|
3451
3752
|
self.moving_average: MetricsTree_Market_MovingAverage = MetricsTree_Market_MovingAverage(client)
|
|
3452
3753
|
self.range: MetricsTree_Market_Range = MetricsTree_Market_Range(client)
|
|
3453
3754
|
self.returns: MetricsTree_Market_Returns = MetricsTree_Market_Returns(client)
|
|
@@ -3671,37 +3972,6 @@ class MetricsTree_Price_Cents:
|
|
|
3671
3972
|
self.ohlc: MetricPattern5[OHLCCents] = MetricPattern5(client, 'ohlc_cents')
|
|
3672
3973
|
self.split: MetricsTree_Price_Cents_Split = MetricsTree_Price_Cents_Split(client)
|
|
3673
3974
|
|
|
3674
|
-
class MetricsTree_Price_Oracle:
|
|
3675
|
-
"""Metrics tree node."""
|
|
3676
|
-
|
|
3677
|
-
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3678
|
-
self.height_to_first_pairoutputindex: MetricPattern11[PairOutputIndex] = MetricPattern11(client, 'height_to_first_pairoutputindex')
|
|
3679
|
-
self.ohlc_cents: MetricPattern6[OHLCCents] = MetricPattern6(client, 'oracle_ohlc_cents')
|
|
3680
|
-
self.ohlc_dollars: MetricPattern6[OHLCDollars] = MetricPattern6(client, 'oracle_ohlc')
|
|
3681
|
-
self.output0_value: MetricPattern33[Sats] = MetricPattern33(client, 'pair_output0_value')
|
|
3682
|
-
self.output1_value: MetricPattern33[Sats] = MetricPattern33(client, 'pair_output1_value')
|
|
3683
|
-
self.pairoutputindex_to_txindex: MetricPattern33[TxIndex] = MetricPattern33(client, 'pairoutputindex_to_txindex')
|
|
3684
|
-
self.phase_daily_cents: PhaseDailyCentsPattern[Cents] = PhaseDailyCentsPattern(client, 'phase_daily')
|
|
3685
|
-
self.phase_daily_dollars: PhaseDailyCentsPattern[Dollars] = PhaseDailyCentsPattern(client, 'phase_daily_dollars')
|
|
3686
|
-
self.phase_histogram: MetricPattern11[OracleBins] = MetricPattern11(client, 'phase_histogram')
|
|
3687
|
-
self.phase_price_cents: MetricPattern11[Cents] = MetricPattern11(client, 'phase_price_cents')
|
|
3688
|
-
self.phase_v2_daily_cents: PhaseDailyCentsPattern[Cents] = PhaseDailyCentsPattern(client, 'phase_v2_daily')
|
|
3689
|
-
self.phase_v2_daily_dollars: PhaseDailyCentsPattern[Dollars] = PhaseDailyCentsPattern(client, 'phase_v2_daily_dollars')
|
|
3690
|
-
self.phase_v2_histogram: MetricPattern11[OracleBinsV2] = MetricPattern11(client, 'phase_v2_histogram')
|
|
3691
|
-
self.phase_v2_peak_daily_cents: PhaseDailyCentsPattern[Cents] = PhaseDailyCentsPattern(client, 'phase_v2_peak_daily')
|
|
3692
|
-
self.phase_v2_peak_daily_dollars: PhaseDailyCentsPattern[Dollars] = PhaseDailyCentsPattern(client, 'phase_v2_peak_daily_dollars')
|
|
3693
|
-
self.phase_v2_peak_price_cents: MetricPattern11[Cents] = MetricPattern11(client, 'phase_v2_peak_price_cents')
|
|
3694
|
-
self.phase_v2_price_cents: MetricPattern11[Cents] = MetricPattern11(client, 'phase_v2_price_cents')
|
|
3695
|
-
self.phase_v3_daily_cents: PhaseDailyCentsPattern[Cents] = PhaseDailyCentsPattern(client, 'phase_v3_daily')
|
|
3696
|
-
self.phase_v3_daily_dollars: PhaseDailyCentsPattern[Dollars] = PhaseDailyCentsPattern(client, 'phase_v3_daily_dollars')
|
|
3697
|
-
self.phase_v3_histogram: MetricPattern11[OracleBinsV2] = MetricPattern11(client, 'phase_v3_histogram')
|
|
3698
|
-
self.phase_v3_peak_daily_cents: PhaseDailyCentsPattern[Cents] = PhaseDailyCentsPattern(client, 'phase_v3_peak_daily')
|
|
3699
|
-
self.phase_v3_peak_daily_dollars: PhaseDailyCentsPattern[Dollars] = PhaseDailyCentsPattern(client, 'phase_v3_peak_daily_dollars')
|
|
3700
|
-
self.phase_v3_peak_price_cents: MetricPattern11[Cents] = MetricPattern11(client, 'phase_v3_peak_price_cents')
|
|
3701
|
-
self.phase_v3_price_cents: MetricPattern11[Cents] = MetricPattern11(client, 'phase_v3_price_cents')
|
|
3702
|
-
self.price_cents: MetricPattern11[Cents] = MetricPattern11(client, 'oracle_price_cents')
|
|
3703
|
-
self.tx_count: MetricPattern6[StoredU32] = MetricPattern6(client, 'oracle_tx_count')
|
|
3704
|
-
|
|
3705
3975
|
class MetricsTree_Price_Usd:
|
|
3706
3976
|
"""Metrics tree node."""
|
|
3707
3977
|
|
|
@@ -3714,7 +3984,6 @@ class MetricsTree_Price:
|
|
|
3714
3984
|
|
|
3715
3985
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3716
3986
|
self.cents: MetricsTree_Price_Cents = MetricsTree_Price_Cents(client)
|
|
3717
|
-
self.oracle: MetricsTree_Price_Oracle = MetricsTree_Price_Oracle(client)
|
|
3718
3987
|
self.sats: SatsPattern[OHLCSats] = SatsPattern(client, 'price')
|
|
3719
3988
|
self.usd: MetricsTree_Price_Usd = MetricsTree_Price_Usd(client)
|
|
3720
3989
|
|
|
@@ -3798,28 +4067,12 @@ class MetricsTree_Transactions_Count:
|
|
|
3798
4067
|
self.is_coinbase: MetricPattern27[StoredBool] = MetricPattern27(client, 'is_coinbase')
|
|
3799
4068
|
self.tx_count: DollarsPattern[StoredU64] = DollarsPattern(client, 'tx_count')
|
|
3800
4069
|
|
|
3801
|
-
class MetricsTree_Transactions_Fees_Fee_Dollars:
|
|
3802
|
-
"""Metrics tree node."""
|
|
3803
|
-
|
|
3804
|
-
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3805
|
-
self.average: MetricPattern1[Dollars] = MetricPattern1(client, 'fee_usd_average')
|
|
3806
|
-
self.cumulative: MetricPattern2[Dollars] = MetricPattern2(client, 'fee_usd_cumulative')
|
|
3807
|
-
self.height_cumulative: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_cumulative')
|
|
3808
|
-
self.max: MetricPattern1[Dollars] = MetricPattern1(client, 'fee_usd_max')
|
|
3809
|
-
self.median: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_median')
|
|
3810
|
-
self.min: MetricPattern1[Dollars] = MetricPattern1(client, 'fee_usd_min')
|
|
3811
|
-
self.pct10: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_pct10')
|
|
3812
|
-
self.pct25: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_pct25')
|
|
3813
|
-
self.pct75: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_pct75')
|
|
3814
|
-
self.pct90: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_pct90')
|
|
3815
|
-
self.sum: MetricPattern1[Dollars] = MetricPattern1(client, 'fee_usd_sum')
|
|
3816
|
-
|
|
3817
4070
|
class MetricsTree_Transactions_Fees_Fee:
|
|
3818
4071
|
"""Metrics tree node."""
|
|
3819
4072
|
|
|
3820
4073
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3821
4074
|
self.bitcoin: CountPattern2[Bitcoin] = CountPattern2(client, 'fee_btc')
|
|
3822
|
-
self.dollars:
|
|
4075
|
+
self.dollars: CountPattern2[Dollars] = CountPattern2(client, 'fee_usd')
|
|
3823
4076
|
self.sats: CountPattern2[Sats] = CountPattern2(client, 'fee')
|
|
3824
4077
|
self.txindex: MetricPattern27[Sats] = MetricPattern27(client, 'fee')
|
|
3825
4078
|
|
|
@@ -3854,6 +4107,7 @@ class MetricsTree_Transactions_Volume:
|
|
|
3854
4107
|
self.annualized_volume: _2015Pattern = _2015Pattern(client, 'annualized_volume')
|
|
3855
4108
|
self.inputs_per_sec: MetricPattern4[StoredF32] = MetricPattern4(client, 'inputs_per_sec')
|
|
3856
4109
|
self.outputs_per_sec: MetricPattern4[StoredF32] = MetricPattern4(client, 'outputs_per_sec')
|
|
4110
|
+
self.received_sum: ActiveSupplyPattern = ActiveSupplyPattern(client, 'received_sum')
|
|
3857
4111
|
self.sent_sum: ActiveSupplyPattern = ActiveSupplyPattern(client, 'sent_sum')
|
|
3858
4112
|
self.tx_per_sec: MetricPattern4[StoredF32] = MetricPattern4(client, 'tx_per_sec')
|
|
3859
4113
|
|
|
@@ -3900,7 +4154,7 @@ class MetricsTree:
|
|
|
3900
4154
|
class BrkClient(BrkClientBase):
|
|
3901
4155
|
"""Main BRK client with metrics tree and API methods."""
|
|
3902
4156
|
|
|
3903
|
-
VERSION = "v0.1.
|
|
4157
|
+
VERSION = "v0.1.1"
|
|
3904
4158
|
|
|
3905
4159
|
INDEXES = [
|
|
3906
4160
|
"dateindex",
|
|
@@ -4110,27 +4364,27 @@ class BrkClient(BrkClientBase):
|
|
|
4110
4364
|
EPOCH_NAMES = {
|
|
4111
4365
|
"_0": {
|
|
4112
4366
|
"id": "epoch_0",
|
|
4113
|
-
"short": "
|
|
4367
|
+
"short": "0",
|
|
4114
4368
|
"long": "Epoch 0"
|
|
4115
4369
|
},
|
|
4116
4370
|
"_1": {
|
|
4117
4371
|
"id": "epoch_1",
|
|
4118
|
-
"short": "
|
|
4372
|
+
"short": "1",
|
|
4119
4373
|
"long": "Epoch 1"
|
|
4120
4374
|
},
|
|
4121
4375
|
"_2": {
|
|
4122
4376
|
"id": "epoch_2",
|
|
4123
|
-
"short": "
|
|
4377
|
+
"short": "2",
|
|
4124
4378
|
"long": "Epoch 2"
|
|
4125
4379
|
},
|
|
4126
4380
|
"_3": {
|
|
4127
4381
|
"id": "epoch_3",
|
|
4128
|
-
"short": "
|
|
4382
|
+
"short": "3",
|
|
4129
4383
|
"long": "Epoch 3"
|
|
4130
4384
|
},
|
|
4131
4385
|
"_4": {
|
|
4132
4386
|
"id": "epoch_4",
|
|
4133
|
-
"short": "
|
|
4387
|
+
"short": "4",
|
|
4134
4388
|
"long": "Epoch 4"
|
|
4135
4389
|
}
|
|
4136
4390
|
}
|
|
@@ -4288,107 +4542,107 @@ class BrkClient(BrkClientBase):
|
|
|
4288
4542
|
|
|
4289
4543
|
AGE_RANGE_NAMES = {
|
|
4290
4544
|
"up_to_1h": {
|
|
4291
|
-
"id": "
|
|
4545
|
+
"id": "under_1h_old",
|
|
4292
4546
|
"short": "<1h",
|
|
4293
|
-
"long": "
|
|
4547
|
+
"long": "Under 1 Hour Old"
|
|
4294
4548
|
},
|
|
4295
4549
|
"_1h_to_1d": {
|
|
4296
|
-
"id": "
|
|
4550
|
+
"id": "1h_to_1d_old",
|
|
4297
4551
|
"short": "1h-1d",
|
|
4298
4552
|
"long": "1 Hour to 1 Day Old"
|
|
4299
4553
|
},
|
|
4300
4554
|
"_1d_to_1w": {
|
|
4301
|
-
"id": "
|
|
4555
|
+
"id": "1d_to_1w_old",
|
|
4302
4556
|
"short": "1d-1w",
|
|
4303
4557
|
"long": "1 Day to 1 Week Old"
|
|
4304
4558
|
},
|
|
4305
4559
|
"_1w_to_1m": {
|
|
4306
|
-
"id": "
|
|
4560
|
+
"id": "1w_to_1m_old",
|
|
4307
4561
|
"short": "1w-1m",
|
|
4308
4562
|
"long": "1 Week to 1 Month Old"
|
|
4309
4563
|
},
|
|
4310
4564
|
"_1m_to_2m": {
|
|
4311
|
-
"id": "
|
|
4565
|
+
"id": "1m_to_2m_old",
|
|
4312
4566
|
"short": "1m-2m",
|
|
4313
4567
|
"long": "1 to 2 Months Old"
|
|
4314
4568
|
},
|
|
4315
4569
|
"_2m_to_3m": {
|
|
4316
|
-
"id": "
|
|
4570
|
+
"id": "2m_to_3m_old",
|
|
4317
4571
|
"short": "2m-3m",
|
|
4318
4572
|
"long": "2 to 3 Months Old"
|
|
4319
4573
|
},
|
|
4320
4574
|
"_3m_to_4m": {
|
|
4321
|
-
"id": "
|
|
4575
|
+
"id": "3m_to_4m_old",
|
|
4322
4576
|
"short": "3m-4m",
|
|
4323
4577
|
"long": "3 to 4 Months Old"
|
|
4324
4578
|
},
|
|
4325
4579
|
"_4m_to_5m": {
|
|
4326
|
-
"id": "
|
|
4580
|
+
"id": "4m_to_5m_old",
|
|
4327
4581
|
"short": "4m-5m",
|
|
4328
4582
|
"long": "4 to 5 Months Old"
|
|
4329
4583
|
},
|
|
4330
4584
|
"_5m_to_6m": {
|
|
4331
|
-
"id": "
|
|
4585
|
+
"id": "5m_to_6m_old",
|
|
4332
4586
|
"short": "5m-6m",
|
|
4333
4587
|
"long": "5 to 6 Months Old"
|
|
4334
4588
|
},
|
|
4335
4589
|
"_6m_to_1y": {
|
|
4336
|
-
"id": "
|
|
4590
|
+
"id": "6m_to_1y_old",
|
|
4337
4591
|
"short": "6m-1y",
|
|
4338
4592
|
"long": "6 Months to 1 Year Old"
|
|
4339
4593
|
},
|
|
4340
4594
|
"_1y_to_2y": {
|
|
4341
|
-
"id": "
|
|
4595
|
+
"id": "1y_to_2y_old",
|
|
4342
4596
|
"short": "1y-2y",
|
|
4343
4597
|
"long": "1 to 2 Years Old"
|
|
4344
4598
|
},
|
|
4345
4599
|
"_2y_to_3y": {
|
|
4346
|
-
"id": "
|
|
4600
|
+
"id": "2y_to_3y_old",
|
|
4347
4601
|
"short": "2y-3y",
|
|
4348
4602
|
"long": "2 to 3 Years Old"
|
|
4349
4603
|
},
|
|
4350
4604
|
"_3y_to_4y": {
|
|
4351
|
-
"id": "
|
|
4605
|
+
"id": "3y_to_4y_old",
|
|
4352
4606
|
"short": "3y-4y",
|
|
4353
4607
|
"long": "3 to 4 Years Old"
|
|
4354
4608
|
},
|
|
4355
4609
|
"_4y_to_5y": {
|
|
4356
|
-
"id": "
|
|
4610
|
+
"id": "4y_to_5y_old",
|
|
4357
4611
|
"short": "4y-5y",
|
|
4358
4612
|
"long": "4 to 5 Years Old"
|
|
4359
4613
|
},
|
|
4360
4614
|
"_5y_to_6y": {
|
|
4361
|
-
"id": "
|
|
4615
|
+
"id": "5y_to_6y_old",
|
|
4362
4616
|
"short": "5y-6y",
|
|
4363
4617
|
"long": "5 to 6 Years Old"
|
|
4364
4618
|
},
|
|
4365
4619
|
"_6y_to_7y": {
|
|
4366
|
-
"id": "
|
|
4620
|
+
"id": "6y_to_7y_old",
|
|
4367
4621
|
"short": "6y-7y",
|
|
4368
4622
|
"long": "6 to 7 Years Old"
|
|
4369
4623
|
},
|
|
4370
4624
|
"_7y_to_8y": {
|
|
4371
|
-
"id": "
|
|
4625
|
+
"id": "7y_to_8y_old",
|
|
4372
4626
|
"short": "7y-8y",
|
|
4373
4627
|
"long": "7 to 8 Years Old"
|
|
4374
4628
|
},
|
|
4375
4629
|
"_8y_to_10y": {
|
|
4376
|
-
"id": "
|
|
4630
|
+
"id": "8y_to_10y_old",
|
|
4377
4631
|
"short": "8y-10y",
|
|
4378
4632
|
"long": "8 to 10 Years Old"
|
|
4379
4633
|
},
|
|
4380
4634
|
"_10y_to_12y": {
|
|
4381
|
-
"id": "
|
|
4635
|
+
"id": "10y_to_12y_old",
|
|
4382
4636
|
"short": "10y-12y",
|
|
4383
4637
|
"long": "10 to 12 Years Old"
|
|
4384
4638
|
},
|
|
4385
4639
|
"_12y_to_15y": {
|
|
4386
|
-
"id": "
|
|
4640
|
+
"id": "12y_to_15y_old",
|
|
4387
4641
|
"short": "12y-15y",
|
|
4388
4642
|
"long": "12 to 15 Years Old"
|
|
4389
4643
|
},
|
|
4390
4644
|
"from_15y": {
|
|
4391
|
-
"id": "
|
|
4645
|
+
"id": "over_15y_old",
|
|
4392
4646
|
"short": "15y+",
|
|
4393
4647
|
"long": "15+ Years Old"
|
|
4394
4648
|
}
|
|
@@ -4396,187 +4650,187 @@ class BrkClient(BrkClientBase):
|
|
|
4396
4650
|
|
|
4397
4651
|
MAX_AGE_NAMES = {
|
|
4398
4652
|
"_1w": {
|
|
4399
|
-
"id": "
|
|
4653
|
+
"id": "under_1w_old",
|
|
4400
4654
|
"short": "<1w",
|
|
4401
|
-
"long": "
|
|
4655
|
+
"long": "Under 1 Week Old"
|
|
4402
4656
|
},
|
|
4403
4657
|
"_1m": {
|
|
4404
|
-
"id": "
|
|
4658
|
+
"id": "under_1m_old",
|
|
4405
4659
|
"short": "<1m",
|
|
4406
|
-
"long": "
|
|
4660
|
+
"long": "Under 1 Month Old"
|
|
4407
4661
|
},
|
|
4408
4662
|
"_2m": {
|
|
4409
|
-
"id": "
|
|
4663
|
+
"id": "under_2m_old",
|
|
4410
4664
|
"short": "<2m",
|
|
4411
|
-
"long": "
|
|
4665
|
+
"long": "Under 2 Months Old"
|
|
4412
4666
|
},
|
|
4413
4667
|
"_3m": {
|
|
4414
|
-
"id": "
|
|
4668
|
+
"id": "under_3m_old",
|
|
4415
4669
|
"short": "<3m",
|
|
4416
|
-
"long": "
|
|
4670
|
+
"long": "Under 3 Months Old"
|
|
4417
4671
|
},
|
|
4418
4672
|
"_4m": {
|
|
4419
|
-
"id": "
|
|
4673
|
+
"id": "under_4m_old",
|
|
4420
4674
|
"short": "<4m",
|
|
4421
|
-
"long": "
|
|
4675
|
+
"long": "Under 4 Months Old"
|
|
4422
4676
|
},
|
|
4423
4677
|
"_5m": {
|
|
4424
|
-
"id": "
|
|
4678
|
+
"id": "under_5m_old",
|
|
4425
4679
|
"short": "<5m",
|
|
4426
|
-
"long": "
|
|
4680
|
+
"long": "Under 5 Months Old"
|
|
4427
4681
|
},
|
|
4428
4682
|
"_6m": {
|
|
4429
|
-
"id": "
|
|
4683
|
+
"id": "under_6m_old",
|
|
4430
4684
|
"short": "<6m",
|
|
4431
|
-
"long": "
|
|
4685
|
+
"long": "Under 6 Months Old"
|
|
4432
4686
|
},
|
|
4433
4687
|
"_1y": {
|
|
4434
|
-
"id": "
|
|
4688
|
+
"id": "under_1y_old",
|
|
4435
4689
|
"short": "<1y",
|
|
4436
|
-
"long": "
|
|
4690
|
+
"long": "Under 1 Year Old"
|
|
4437
4691
|
},
|
|
4438
4692
|
"_2y": {
|
|
4439
|
-
"id": "
|
|
4693
|
+
"id": "under_2y_old",
|
|
4440
4694
|
"short": "<2y",
|
|
4441
|
-
"long": "
|
|
4695
|
+
"long": "Under 2 Years Old"
|
|
4442
4696
|
},
|
|
4443
4697
|
"_3y": {
|
|
4444
|
-
"id": "
|
|
4698
|
+
"id": "under_3y_old",
|
|
4445
4699
|
"short": "<3y",
|
|
4446
|
-
"long": "
|
|
4700
|
+
"long": "Under 3 Years Old"
|
|
4447
4701
|
},
|
|
4448
4702
|
"_4y": {
|
|
4449
|
-
"id": "
|
|
4703
|
+
"id": "under_4y_old",
|
|
4450
4704
|
"short": "<4y",
|
|
4451
|
-
"long": "
|
|
4705
|
+
"long": "Under 4 Years Old"
|
|
4452
4706
|
},
|
|
4453
4707
|
"_5y": {
|
|
4454
|
-
"id": "
|
|
4708
|
+
"id": "under_5y_old",
|
|
4455
4709
|
"short": "<5y",
|
|
4456
|
-
"long": "
|
|
4710
|
+
"long": "Under 5 Years Old"
|
|
4457
4711
|
},
|
|
4458
4712
|
"_6y": {
|
|
4459
|
-
"id": "
|
|
4713
|
+
"id": "under_6y_old",
|
|
4460
4714
|
"short": "<6y",
|
|
4461
|
-
"long": "
|
|
4715
|
+
"long": "Under 6 Years Old"
|
|
4462
4716
|
},
|
|
4463
4717
|
"_7y": {
|
|
4464
|
-
"id": "
|
|
4718
|
+
"id": "under_7y_old",
|
|
4465
4719
|
"short": "<7y",
|
|
4466
|
-
"long": "
|
|
4720
|
+
"long": "Under 7 Years Old"
|
|
4467
4721
|
},
|
|
4468
4722
|
"_8y": {
|
|
4469
|
-
"id": "
|
|
4723
|
+
"id": "under_8y_old",
|
|
4470
4724
|
"short": "<8y",
|
|
4471
|
-
"long": "
|
|
4725
|
+
"long": "Under 8 Years Old"
|
|
4472
4726
|
},
|
|
4473
4727
|
"_10y": {
|
|
4474
|
-
"id": "
|
|
4728
|
+
"id": "under_10y_old",
|
|
4475
4729
|
"short": "<10y",
|
|
4476
|
-
"long": "
|
|
4730
|
+
"long": "Under 10 Years Old"
|
|
4477
4731
|
},
|
|
4478
4732
|
"_12y": {
|
|
4479
|
-
"id": "
|
|
4733
|
+
"id": "under_12y_old",
|
|
4480
4734
|
"short": "<12y",
|
|
4481
|
-
"long": "
|
|
4735
|
+
"long": "Under 12 Years Old"
|
|
4482
4736
|
},
|
|
4483
4737
|
"_15y": {
|
|
4484
|
-
"id": "
|
|
4738
|
+
"id": "under_15y_old",
|
|
4485
4739
|
"short": "<15y",
|
|
4486
|
-
"long": "
|
|
4740
|
+
"long": "Under 15 Years Old"
|
|
4487
4741
|
}
|
|
4488
4742
|
}
|
|
4489
4743
|
|
|
4490
4744
|
MIN_AGE_NAMES = {
|
|
4491
4745
|
"_1d": {
|
|
4492
|
-
"id": "
|
|
4746
|
+
"id": "over_1d_old",
|
|
4493
4747
|
"short": "1d+",
|
|
4494
|
-
"long": "
|
|
4748
|
+
"long": "Over 1 Day Old"
|
|
4495
4749
|
},
|
|
4496
4750
|
"_1w": {
|
|
4497
|
-
"id": "
|
|
4751
|
+
"id": "over_1w_old",
|
|
4498
4752
|
"short": "1w+",
|
|
4499
|
-
"long": "
|
|
4753
|
+
"long": "Over 1 Week Old"
|
|
4500
4754
|
},
|
|
4501
4755
|
"_1m": {
|
|
4502
|
-
"id": "
|
|
4756
|
+
"id": "over_1m_old",
|
|
4503
4757
|
"short": "1m+",
|
|
4504
|
-
"long": "
|
|
4758
|
+
"long": "Over 1 Month Old"
|
|
4505
4759
|
},
|
|
4506
4760
|
"_2m": {
|
|
4507
|
-
"id": "
|
|
4761
|
+
"id": "over_2m_old",
|
|
4508
4762
|
"short": "2m+",
|
|
4509
|
-
"long": "
|
|
4763
|
+
"long": "Over 2 Months Old"
|
|
4510
4764
|
},
|
|
4511
4765
|
"_3m": {
|
|
4512
|
-
"id": "
|
|
4766
|
+
"id": "over_3m_old",
|
|
4513
4767
|
"short": "3m+",
|
|
4514
|
-
"long": "
|
|
4768
|
+
"long": "Over 3 Months Old"
|
|
4515
4769
|
},
|
|
4516
4770
|
"_4m": {
|
|
4517
|
-
"id": "
|
|
4771
|
+
"id": "over_4m_old",
|
|
4518
4772
|
"short": "4m+",
|
|
4519
|
-
"long": "
|
|
4773
|
+
"long": "Over 4 Months Old"
|
|
4520
4774
|
},
|
|
4521
4775
|
"_5m": {
|
|
4522
|
-
"id": "
|
|
4776
|
+
"id": "over_5m_old",
|
|
4523
4777
|
"short": "5m+",
|
|
4524
|
-
"long": "
|
|
4778
|
+
"long": "Over 5 Months Old"
|
|
4525
4779
|
},
|
|
4526
4780
|
"_6m": {
|
|
4527
|
-
"id": "
|
|
4781
|
+
"id": "over_6m_old",
|
|
4528
4782
|
"short": "6m+",
|
|
4529
|
-
"long": "
|
|
4783
|
+
"long": "Over 6 Months Old"
|
|
4530
4784
|
},
|
|
4531
4785
|
"_1y": {
|
|
4532
|
-
"id": "
|
|
4786
|
+
"id": "over_1y_old",
|
|
4533
4787
|
"short": "1y+",
|
|
4534
|
-
"long": "
|
|
4788
|
+
"long": "Over 1 Year Old"
|
|
4535
4789
|
},
|
|
4536
4790
|
"_2y": {
|
|
4537
|
-
"id": "
|
|
4791
|
+
"id": "over_2y_old",
|
|
4538
4792
|
"short": "2y+",
|
|
4539
|
-
"long": "
|
|
4793
|
+
"long": "Over 2 Years Old"
|
|
4540
4794
|
},
|
|
4541
4795
|
"_3y": {
|
|
4542
|
-
"id": "
|
|
4796
|
+
"id": "over_3y_old",
|
|
4543
4797
|
"short": "3y+",
|
|
4544
|
-
"long": "
|
|
4798
|
+
"long": "Over 3 Years Old"
|
|
4545
4799
|
},
|
|
4546
4800
|
"_4y": {
|
|
4547
|
-
"id": "
|
|
4801
|
+
"id": "over_4y_old",
|
|
4548
4802
|
"short": "4y+",
|
|
4549
|
-
"long": "
|
|
4803
|
+
"long": "Over 4 Years Old"
|
|
4550
4804
|
},
|
|
4551
4805
|
"_5y": {
|
|
4552
|
-
"id": "
|
|
4806
|
+
"id": "over_5y_old",
|
|
4553
4807
|
"short": "5y+",
|
|
4554
|
-
"long": "
|
|
4808
|
+
"long": "Over 5 Years Old"
|
|
4555
4809
|
},
|
|
4556
4810
|
"_6y": {
|
|
4557
|
-
"id": "
|
|
4811
|
+
"id": "over_6y_old",
|
|
4558
4812
|
"short": "6y+",
|
|
4559
|
-
"long": "
|
|
4813
|
+
"long": "Over 6 Years Old"
|
|
4560
4814
|
},
|
|
4561
4815
|
"_7y": {
|
|
4562
|
-
"id": "
|
|
4816
|
+
"id": "over_7y_old",
|
|
4563
4817
|
"short": "7y+",
|
|
4564
|
-
"long": "
|
|
4818
|
+
"long": "Over 7 Years Old"
|
|
4565
4819
|
},
|
|
4566
4820
|
"_8y": {
|
|
4567
|
-
"id": "
|
|
4821
|
+
"id": "over_8y_old",
|
|
4568
4822
|
"short": "8y+",
|
|
4569
|
-
"long": "
|
|
4823
|
+
"long": "Over 8 Years Old"
|
|
4570
4824
|
},
|
|
4571
4825
|
"_10y": {
|
|
4572
|
-
"id": "
|
|
4826
|
+
"id": "over_10y_old",
|
|
4573
4827
|
"short": "10y+",
|
|
4574
|
-
"long": "
|
|
4828
|
+
"long": "Over 10 Years Old"
|
|
4575
4829
|
},
|
|
4576
4830
|
"_12y": {
|
|
4577
|
-
"id": "
|
|
4831
|
+
"id": "over_12y_old",
|
|
4578
4832
|
"short": "12y+",
|
|
4579
|
-
"long": "
|
|
4833
|
+
"long": "Over 12 Years Old"
|
|
4580
4834
|
}
|
|
4581
4835
|
}
|
|
4582
4836
|
|
|
@@ -4589,67 +4843,67 @@ class BrkClient(BrkClientBase):
|
|
|
4589
4843
|
"_1sat_to_10sats": {
|
|
4590
4844
|
"id": "above_1sat_under_10sats",
|
|
4591
4845
|
"short": "1-10 sats",
|
|
4592
|
-
"long": "1
|
|
4846
|
+
"long": "1-10 Sats"
|
|
4593
4847
|
},
|
|
4594
4848
|
"_10sats_to_100sats": {
|
|
4595
4849
|
"id": "above_10sats_under_100sats",
|
|
4596
4850
|
"short": "10-100 sats",
|
|
4597
|
-
"long": "10
|
|
4851
|
+
"long": "10-100 Sats"
|
|
4598
4852
|
},
|
|
4599
4853
|
"_100sats_to_1k_sats": {
|
|
4600
4854
|
"id": "above_100sats_under_1k_sats",
|
|
4601
4855
|
"short": "100-1k sats",
|
|
4602
|
-
"long": "100
|
|
4856
|
+
"long": "100-1K Sats"
|
|
4603
4857
|
},
|
|
4604
4858
|
"_1k_sats_to_10k_sats": {
|
|
4605
4859
|
"id": "above_1k_sats_under_10k_sats",
|
|
4606
4860
|
"short": "1k-10k sats",
|
|
4607
|
-
"long": "1K
|
|
4861
|
+
"long": "1K-10K Sats"
|
|
4608
4862
|
},
|
|
4609
4863
|
"_10k_sats_to_100k_sats": {
|
|
4610
4864
|
"id": "above_10k_sats_under_100k_sats",
|
|
4611
4865
|
"short": "10k-100k sats",
|
|
4612
|
-
"long": "10K
|
|
4866
|
+
"long": "10K-100K Sats"
|
|
4613
4867
|
},
|
|
4614
4868
|
"_100k_sats_to_1m_sats": {
|
|
4615
4869
|
"id": "above_100k_sats_under_1m_sats",
|
|
4616
4870
|
"short": "100k-1M sats",
|
|
4617
|
-
"long": "100K
|
|
4871
|
+
"long": "100K-1M Sats"
|
|
4618
4872
|
},
|
|
4619
4873
|
"_1m_sats_to_10m_sats": {
|
|
4620
4874
|
"id": "above_1m_sats_under_10m_sats",
|
|
4621
4875
|
"short": "1M-10M sats",
|
|
4622
|
-
"long": "1M
|
|
4876
|
+
"long": "1M-10M Sats"
|
|
4623
4877
|
},
|
|
4624
4878
|
"_10m_sats_to_1btc": {
|
|
4625
4879
|
"id": "above_10m_sats_under_1btc",
|
|
4626
4880
|
"short": "0.1-1 BTC",
|
|
4627
|
-
"long": "0.1
|
|
4881
|
+
"long": "0.1-1 BTC"
|
|
4628
4882
|
},
|
|
4629
4883
|
"_1btc_to_10btc": {
|
|
4630
4884
|
"id": "above_1btc_under_10btc",
|
|
4631
4885
|
"short": "1-10 BTC",
|
|
4632
|
-
"long": "1
|
|
4886
|
+
"long": "1-10 BTC"
|
|
4633
4887
|
},
|
|
4634
4888
|
"_10btc_to_100btc": {
|
|
4635
4889
|
"id": "above_10btc_under_100btc",
|
|
4636
4890
|
"short": "10-100 BTC",
|
|
4637
|
-
"long": "10
|
|
4891
|
+
"long": "10-100 BTC"
|
|
4638
4892
|
},
|
|
4639
4893
|
"_100btc_to_1k_btc": {
|
|
4640
4894
|
"id": "above_100btc_under_1k_btc",
|
|
4641
4895
|
"short": "100-1k BTC",
|
|
4642
|
-
"long": "100
|
|
4896
|
+
"long": "100-1K BTC"
|
|
4643
4897
|
},
|
|
4644
4898
|
"_1k_btc_to_10k_btc": {
|
|
4645
4899
|
"id": "above_1k_btc_under_10k_btc",
|
|
4646
4900
|
"short": "1k-10k BTC",
|
|
4647
|
-
"long": "1K
|
|
4901
|
+
"long": "1K-10K BTC"
|
|
4648
4902
|
},
|
|
4649
4903
|
"_10k_btc_to_100k_btc": {
|
|
4650
4904
|
"id": "above_10k_btc_under_100k_btc",
|
|
4651
4905
|
"short": "10k-100k BTC",
|
|
4652
|
-
"long": "10K
|
|
4906
|
+
"long": "10K-100K BTC"
|
|
4653
4907
|
},
|
|
4654
4908
|
"_100k_btc_or_more": {
|
|
4655
4909
|
"id": "above_100k_btc",
|
|
@@ -4660,69 +4914,69 @@ class BrkClient(BrkClientBase):
|
|
|
4660
4914
|
|
|
4661
4915
|
GE_AMOUNT_NAMES = {
|
|
4662
4916
|
"_1sat": {
|
|
4663
|
-
"id": "
|
|
4917
|
+
"id": "over_1sat",
|
|
4664
4918
|
"short": "1+ sats",
|
|
4665
|
-
"long": "
|
|
4919
|
+
"long": "Over 1 Sat"
|
|
4666
4920
|
},
|
|
4667
4921
|
"_10sats": {
|
|
4668
|
-
"id": "
|
|
4922
|
+
"id": "over_10sats",
|
|
4669
4923
|
"short": "10+ sats",
|
|
4670
|
-
"long": "
|
|
4924
|
+
"long": "Over 10 Sats"
|
|
4671
4925
|
},
|
|
4672
4926
|
"_100sats": {
|
|
4673
|
-
"id": "
|
|
4927
|
+
"id": "over_100sats",
|
|
4674
4928
|
"short": "100+ sats",
|
|
4675
|
-
"long": "
|
|
4929
|
+
"long": "Over 100 Sats"
|
|
4676
4930
|
},
|
|
4677
4931
|
"_1k_sats": {
|
|
4678
|
-
"id": "
|
|
4932
|
+
"id": "over_1k_sats",
|
|
4679
4933
|
"short": "1k+ sats",
|
|
4680
|
-
"long": "
|
|
4934
|
+
"long": "Over 1K Sats"
|
|
4681
4935
|
},
|
|
4682
4936
|
"_10k_sats": {
|
|
4683
|
-
"id": "
|
|
4937
|
+
"id": "over_10k_sats",
|
|
4684
4938
|
"short": "10k+ sats",
|
|
4685
|
-
"long": "
|
|
4939
|
+
"long": "Over 10K Sats"
|
|
4686
4940
|
},
|
|
4687
4941
|
"_100k_sats": {
|
|
4688
|
-
"id": "
|
|
4942
|
+
"id": "over_100k_sats",
|
|
4689
4943
|
"short": "100k+ sats",
|
|
4690
|
-
"long": "
|
|
4944
|
+
"long": "Over 100K Sats"
|
|
4691
4945
|
},
|
|
4692
4946
|
"_1m_sats": {
|
|
4693
|
-
"id": "
|
|
4947
|
+
"id": "over_1m_sats",
|
|
4694
4948
|
"short": "1M+ sats",
|
|
4695
|
-
"long": "
|
|
4949
|
+
"long": "Over 1M Sats"
|
|
4696
4950
|
},
|
|
4697
4951
|
"_10m_sats": {
|
|
4698
|
-
"id": "
|
|
4952
|
+
"id": "over_10m_sats",
|
|
4699
4953
|
"short": "0.1+ BTC",
|
|
4700
|
-
"long": "
|
|
4954
|
+
"long": "Over 0.1 BTC"
|
|
4701
4955
|
},
|
|
4702
4956
|
"_1btc": {
|
|
4703
|
-
"id": "
|
|
4957
|
+
"id": "over_1btc",
|
|
4704
4958
|
"short": "1+ BTC",
|
|
4705
|
-
"long": "
|
|
4959
|
+
"long": "Over 1 BTC"
|
|
4706
4960
|
},
|
|
4707
4961
|
"_10btc": {
|
|
4708
|
-
"id": "
|
|
4962
|
+
"id": "over_10btc",
|
|
4709
4963
|
"short": "10+ BTC",
|
|
4710
|
-
"long": "
|
|
4964
|
+
"long": "Over 10 BTC"
|
|
4711
4965
|
},
|
|
4712
4966
|
"_100btc": {
|
|
4713
|
-
"id": "
|
|
4967
|
+
"id": "over_100btc",
|
|
4714
4968
|
"short": "100+ BTC",
|
|
4715
|
-
"long": "
|
|
4969
|
+
"long": "Over 100 BTC"
|
|
4716
4970
|
},
|
|
4717
4971
|
"_1k_btc": {
|
|
4718
|
-
"id": "
|
|
4972
|
+
"id": "over_1k_btc",
|
|
4719
4973
|
"short": "1k+ BTC",
|
|
4720
|
-
"long": "
|
|
4974
|
+
"long": "Over 1K BTC"
|
|
4721
4975
|
},
|
|
4722
4976
|
"_10k_btc": {
|
|
4723
|
-
"id": "
|
|
4977
|
+
"id": "over_10k_btc",
|
|
4724
4978
|
"short": "10k+ BTC",
|
|
4725
|
-
"long": "
|
|
4979
|
+
"long": "Over 10K BTC"
|
|
4726
4980
|
}
|
|
4727
4981
|
}
|
|
4728
4982
|
|
|
@@ -4806,6 +5060,14 @@ class BrkClient(BrkClientBase):
|
|
|
4806
5060
|
"""
|
|
4807
5061
|
return MetricEndpointBuilder(self, metric, index)
|
|
4808
5062
|
|
|
5063
|
+
def index_to_date(self, index: Index, i: int) -> date:
|
|
5064
|
+
"""Convert an index value to a date for date-based indexes."""
|
|
5065
|
+
return index_to_date(index, i)
|
|
5066
|
+
|
|
5067
|
+
def is_date_index(self, index: Index) -> bool:
|
|
5068
|
+
"""Check if an index type is date-based."""
|
|
5069
|
+
return is_date_index(index)
|
|
5070
|
+
|
|
4809
5071
|
def get_api(self) -> Any:
|
|
4810
5072
|
"""Compact OpenAPI specification.
|
|
4811
5073
|
|