mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-10 23:13:33 -07:00
website: snapshot
This commit is contained in:
Generated
-17
@@ -561,23 +561,6 @@ dependencies = [
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_playground"
|
||||
version = "0.1.0-beta.0"
|
||||
dependencies = [
|
||||
"brk_computer",
|
||||
"brk_error",
|
||||
"brk_fetcher",
|
||||
"brk_indexer",
|
||||
"brk_logger",
|
||||
"brk_types",
|
||||
"jiff",
|
||||
"memmap2",
|
||||
"plotters",
|
||||
"tracing",
|
||||
"vecdb",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_query"
|
||||
version = "0.1.0-beta.0"
|
||||
|
||||
+251
-284
@@ -1532,42 +1532,6 @@ impl PeriodLumpSumStackPattern {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct ClassAveragePricePattern<T> {
|
||||
pub _2015: MetricPattern4<T>,
|
||||
pub _2016: MetricPattern4<T>,
|
||||
pub _2017: MetricPattern4<T>,
|
||||
pub _2018: MetricPattern4<T>,
|
||||
pub _2019: MetricPattern4<T>,
|
||||
pub _2020: MetricPattern4<T>,
|
||||
pub _2021: MetricPattern4<T>,
|
||||
pub _2022: MetricPattern4<T>,
|
||||
pub _2023: MetricPattern4<T>,
|
||||
pub _2024: MetricPattern4<T>,
|
||||
pub _2025: MetricPattern4<T>,
|
||||
pub _2026: MetricPattern4<T>,
|
||||
}
|
||||
|
||||
impl<T: DeserializeOwned> ClassAveragePricePattern<T> {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
_2015: MetricPattern4::new(client.clone(), _m(&acc, "2015_returns")),
|
||||
_2016: MetricPattern4::new(client.clone(), _m(&acc, "2016_returns")),
|
||||
_2017: MetricPattern4::new(client.clone(), _m(&acc, "2017_returns")),
|
||||
_2018: MetricPattern4::new(client.clone(), _m(&acc, "2018_returns")),
|
||||
_2019: MetricPattern4::new(client.clone(), _m(&acc, "2019_returns")),
|
||||
_2020: MetricPattern4::new(client.clone(), _m(&acc, "2020_returns")),
|
||||
_2021: MetricPattern4::new(client.clone(), _m(&acc, "2021_returns")),
|
||||
_2022: MetricPattern4::new(client.clone(), _m(&acc, "2022_returns")),
|
||||
_2023: MetricPattern4::new(client.clone(), _m(&acc, "2023_returns")),
|
||||
_2024: MetricPattern4::new(client.clone(), _m(&acc, "2024_returns")),
|
||||
_2025: MetricPattern4::new(client.clone(), _m(&acc, "2025_returns")),
|
||||
_2026: MetricPattern4::new(client.clone(), _m(&acc, "2026_returns")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct PeriodAveragePricePattern<T> {
|
||||
pub _10y: MetricPattern4<T>,
|
||||
@@ -1604,6 +1568,42 @@ impl<T: DeserializeOwned> PeriodAveragePricePattern<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct ClassAveragePricePattern<T> {
|
||||
pub _2015: MetricPattern4<T>,
|
||||
pub _2016: MetricPattern4<T>,
|
||||
pub _2017: MetricPattern4<T>,
|
||||
pub _2018: MetricPattern4<T>,
|
||||
pub _2019: MetricPattern4<T>,
|
||||
pub _2020: MetricPattern4<T>,
|
||||
pub _2021: MetricPattern4<T>,
|
||||
pub _2022: MetricPattern4<T>,
|
||||
pub _2023: MetricPattern4<T>,
|
||||
pub _2024: MetricPattern4<T>,
|
||||
pub _2025: MetricPattern4<T>,
|
||||
pub _2026: MetricPattern4<T>,
|
||||
}
|
||||
|
||||
impl<T: DeserializeOwned> ClassAveragePricePattern<T> {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
_2015: MetricPattern4::new(client.clone(), _m(&acc, "2015_average_price")),
|
||||
_2016: MetricPattern4::new(client.clone(), _m(&acc, "2016_average_price")),
|
||||
_2017: MetricPattern4::new(client.clone(), _m(&acc, "2017_average_price")),
|
||||
_2018: MetricPattern4::new(client.clone(), _m(&acc, "2018_average_price")),
|
||||
_2019: MetricPattern4::new(client.clone(), _m(&acc, "2019_average_price")),
|
||||
_2020: MetricPattern4::new(client.clone(), _m(&acc, "2020_average_price")),
|
||||
_2021: MetricPattern4::new(client.clone(), _m(&acc, "2021_average_price")),
|
||||
_2022: MetricPattern4::new(client.clone(), _m(&acc, "2022_average_price")),
|
||||
_2023: MetricPattern4::new(client.clone(), _m(&acc, "2023_average_price")),
|
||||
_2024: MetricPattern4::new(client.clone(), _m(&acc, "2024_average_price")),
|
||||
_2025: MetricPattern4::new(client.clone(), _m(&acc, "2025_average_price")),
|
||||
_2026: MetricPattern4::new(client.clone(), _m(&acc, "2026_average_price")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct BitcoinPattern {
|
||||
pub average: MetricPattern2<Bitcoin>,
|
||||
@@ -1914,6 +1914,58 @@ impl<T: DeserializeOwned> PhaseDailyCentsPattern<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct _100btcPattern {
|
||||
pub activity: ActivityPattern2,
|
||||
pub cost_basis: CostBasisPattern,
|
||||
pub outputs: OutputsPattern,
|
||||
pub realized: RealizedPattern,
|
||||
pub relative: RelativePattern,
|
||||
pub supply: SupplyPattern2,
|
||||
pub unrealized: UnrealizedPattern,
|
||||
}
|
||||
|
||||
impl _100btcPattern {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
activity: ActivityPattern2::new(client.clone(), acc.clone()),
|
||||
cost_basis: CostBasisPattern::new(client.clone(), acc.clone()),
|
||||
outputs: OutputsPattern::new(client.clone(), _m(&acc, "utxo_count")),
|
||||
realized: RealizedPattern::new(client.clone(), acc.clone()),
|
||||
relative: RelativePattern::new(client.clone(), acc.clone()),
|
||||
supply: SupplyPattern2::new(client.clone(), _m(&acc, "supply")),
|
||||
unrealized: UnrealizedPattern::new(client.clone(), acc.clone()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct PeriodCagrPattern {
|
||||
pub _10y: MetricPattern4<StoredF32>,
|
||||
pub _2y: MetricPattern4<StoredF32>,
|
||||
pub _3y: MetricPattern4<StoredF32>,
|
||||
pub _4y: MetricPattern4<StoredF32>,
|
||||
pub _5y: MetricPattern4<StoredF32>,
|
||||
pub _6y: MetricPattern4<StoredF32>,
|
||||
pub _8y: MetricPattern4<StoredF32>,
|
||||
}
|
||||
|
||||
impl PeriodCagrPattern {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
_10y: MetricPattern4::new(client.clone(), _p("10y", &acc)),
|
||||
_2y: MetricPattern4::new(client.clone(), _p("2y", &acc)),
|
||||
_3y: MetricPattern4::new(client.clone(), _p("3y", &acc)),
|
||||
_4y: MetricPattern4::new(client.clone(), _p("4y", &acc)),
|
||||
_5y: MetricPattern4::new(client.clone(), _p("5y", &acc)),
|
||||
_6y: MetricPattern4::new(client.clone(), _p("6y", &acc)),
|
||||
_8y: MetricPattern4::new(client.clone(), _p("8y", &acc)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct _0satsPattern2 {
|
||||
pub activity: ActivityPattern2,
|
||||
@@ -1966,32 +2018,6 @@ impl _10yTo12yPattern {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct PeriodCagrPattern {
|
||||
pub _10y: MetricPattern4<StoredF32>,
|
||||
pub _2y: MetricPattern4<StoredF32>,
|
||||
pub _3y: MetricPattern4<StoredF32>,
|
||||
pub _4y: MetricPattern4<StoredF32>,
|
||||
pub _5y: MetricPattern4<StoredF32>,
|
||||
pub _6y: MetricPattern4<StoredF32>,
|
||||
pub _8y: MetricPattern4<StoredF32>,
|
||||
}
|
||||
|
||||
impl PeriodCagrPattern {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
_10y: MetricPattern4::new(client.clone(), _p("10y", &acc)),
|
||||
_2y: MetricPattern4::new(client.clone(), _p("2y", &acc)),
|
||||
_3y: MetricPattern4::new(client.clone(), _p("3y", &acc)),
|
||||
_4y: MetricPattern4::new(client.clone(), _p("4y", &acc)),
|
||||
_5y: MetricPattern4::new(client.clone(), _p("5y", &acc)),
|
||||
_6y: MetricPattern4::new(client.clone(), _p("6y", &acc)),
|
||||
_8y: MetricPattern4::new(client.clone(), _p("8y", &acc)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct UnrealizedPattern {
|
||||
pub neg_unrealized_loss: MetricPattern1<Dollars>,
|
||||
@@ -2044,32 +2070,6 @@ impl _10yPattern {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct _100btcPattern {
|
||||
pub activity: ActivityPattern2,
|
||||
pub cost_basis: CostBasisPattern,
|
||||
pub outputs: OutputsPattern,
|
||||
pub realized: RealizedPattern,
|
||||
pub relative: RelativePattern,
|
||||
pub supply: SupplyPattern2,
|
||||
pub unrealized: UnrealizedPattern,
|
||||
}
|
||||
|
||||
impl _100btcPattern {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
activity: ActivityPattern2::new(client.clone(), acc.clone()),
|
||||
cost_basis: CostBasisPattern::new(client.clone(), acc.clone()),
|
||||
outputs: OutputsPattern::new(client.clone(), _m(&acc, "utxo_count")),
|
||||
realized: RealizedPattern::new(client.clone(), acc.clone()),
|
||||
relative: RelativePattern::new(client.clone(), acc.clone()),
|
||||
supply: SupplyPattern2::new(client.clone(), _m(&acc, "supply")),
|
||||
unrealized: UnrealizedPattern::new(client.clone(), acc.clone()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct ActivityPattern2 {
|
||||
pub coinblocks_destroyed: BlockCountPattern<StoredF64>,
|
||||
@@ -2112,24 +2112,6 @@ impl<T: DeserializeOwned> SplitPattern2<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct _2015Pattern {
|
||||
pub bitcoin: MetricPattern4<Bitcoin>,
|
||||
pub dollars: MetricPattern4<Dollars>,
|
||||
pub sats: MetricPattern4<Sats>,
|
||||
}
|
||||
|
||||
impl _2015Pattern {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
bitcoin: MetricPattern4::new(client.clone(), _m(&acc, "btc")),
|
||||
dollars: MetricPattern4::new(client.clone(), _m(&acc, "usd")),
|
||||
sats: MetricPattern4::new(client.clone(), acc.clone()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct CostBasisPattern2 {
|
||||
pub max: MetricPattern1<Dollars>,
|
||||
@@ -2184,24 +2166,6 @@ impl CoinbasePattern2 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct SegwitAdoptionPattern {
|
||||
pub base: MetricPattern11<StoredF32>,
|
||||
pub cumulative: MetricPattern2<StoredF32>,
|
||||
pub sum: MetricPattern2<StoredF32>,
|
||||
}
|
||||
|
||||
impl SegwitAdoptionPattern {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
base: MetricPattern11::new(client.clone(), acc.clone()),
|
||||
cumulative: MetricPattern2::new(client.clone(), _m(&acc, "cumulative")),
|
||||
sum: MetricPattern2::new(client.clone(), _m(&acc, "sum")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct ActiveSupplyPattern {
|
||||
pub bitcoin: MetricPattern1<Bitcoin>,
|
||||
@@ -2220,6 +2184,24 @@ impl ActiveSupplyPattern {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct SegwitAdoptionPattern {
|
||||
pub base: MetricPattern11<StoredF32>,
|
||||
pub cumulative: MetricPattern2<StoredF32>,
|
||||
pub sum: MetricPattern2<StoredF32>,
|
||||
}
|
||||
|
||||
impl SegwitAdoptionPattern {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
base: MetricPattern11::new(client.clone(), acc.clone()),
|
||||
cumulative: MetricPattern2::new(client.clone(), _m(&acc, "cumulative")),
|
||||
sum: MetricPattern2::new(client.clone(), _m(&acc, "sum")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct UnclaimedRewardsPattern {
|
||||
pub bitcoin: BitcoinPattern2<Bitcoin>,
|
||||
@@ -2238,6 +2220,24 @@ impl UnclaimedRewardsPattern {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct _2015Pattern {
|
||||
pub bitcoin: MetricPattern4<Bitcoin>,
|
||||
pub dollars: MetricPattern4<Dollars>,
|
||||
pub sats: MetricPattern4<Sats>,
|
||||
}
|
||||
|
||||
impl _2015Pattern {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
bitcoin: MetricPattern4::new(client.clone(), _m(&acc, "btc")),
|
||||
dollars: MetricPattern4::new(client.clone(), _m(&acc, "usd")),
|
||||
sats: MetricPattern4::new(client.clone(), acc.clone()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct SupplyPattern2 {
|
||||
pub halved: ActiveSupplyPattern,
|
||||
@@ -2303,17 +2303,17 @@ impl _1dReturns1mSdPattern {
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct SatsPattern<T> {
|
||||
pub ohlc: MetricPattern1<T>,
|
||||
pub split: SplitPattern2<T>,
|
||||
pub struct BitcoinPattern2<T> {
|
||||
pub cumulative: MetricPattern2<T>,
|
||||
pub sum: MetricPattern1<T>,
|
||||
}
|
||||
|
||||
impl<T: DeserializeOwned> SatsPattern<T> {
|
||||
impl<T: DeserializeOwned> BitcoinPattern2<T> {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
ohlc: MetricPattern1::new(client.clone(), _m(&acc, "ohlc")),
|
||||
split: SplitPattern2::new(client.clone(), acc.clone()),
|
||||
cumulative: MetricPattern2::new(client.clone(), _m(&acc, "cumulative")),
|
||||
sum: MetricPattern1::new(client.clone(), acc.clone()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2335,17 +2335,17 @@ impl<T: DeserializeOwned> BlockCountPattern<T> {
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct BitcoinPattern2<T> {
|
||||
pub cumulative: MetricPattern2<T>,
|
||||
pub sum: MetricPattern1<T>,
|
||||
pub struct SatsPattern<T> {
|
||||
pub ohlc: MetricPattern1<T>,
|
||||
pub split: SplitPattern2<T>,
|
||||
}
|
||||
|
||||
impl<T: DeserializeOwned> BitcoinPattern2<T> {
|
||||
impl<T: DeserializeOwned> SatsPattern<T> {
|
||||
/// Create a new pattern node with accumulated metric name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
cumulative: MetricPattern2::new(client.clone(), _m(&acc, "cumulative")),
|
||||
sum: MetricPattern1::new(client.clone(), acc.clone()),
|
||||
ohlc: MetricPattern1::new(client.clone(), _m(&acc, "ohlc")),
|
||||
split: SplitPattern2::new(client.clone(), acc.clone()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3019,19 +3019,19 @@ pub struct MetricsTree_Distribution_AddressCohorts_GeAmount {
|
||||
impl MetricsTree_Distribution_AddressCohorts_GeAmount {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
_100btc: _0satsPattern::new(client.clone(), "addrs_above_100btc".to_string()),
|
||||
_100k_sats: _0satsPattern::new(client.clone(), "addrs_above_100k_sats".to_string()),
|
||||
_100sats: _0satsPattern::new(client.clone(), "addrs_above_100sats".to_string()),
|
||||
_10btc: _0satsPattern::new(client.clone(), "addrs_above_10btc".to_string()),
|
||||
_10k_btc: _0satsPattern::new(client.clone(), "addrs_above_10k_btc".to_string()),
|
||||
_10k_sats: _0satsPattern::new(client.clone(), "addrs_above_10k_sats".to_string()),
|
||||
_10m_sats: _0satsPattern::new(client.clone(), "addrs_above_10m_sats".to_string()),
|
||||
_10sats: _0satsPattern::new(client.clone(), "addrs_above_10sats".to_string()),
|
||||
_1btc: _0satsPattern::new(client.clone(), "addrs_above_1btc".to_string()),
|
||||
_1k_btc: _0satsPattern::new(client.clone(), "addrs_above_1k_btc".to_string()),
|
||||
_1k_sats: _0satsPattern::new(client.clone(), "addrs_above_1k_sats".to_string()),
|
||||
_1m_sats: _0satsPattern::new(client.clone(), "addrs_above_1m_sats".to_string()),
|
||||
_1sat: _0satsPattern::new(client.clone(), "addrs_above_1sat".to_string()),
|
||||
_100btc: _0satsPattern::new(client.clone(), "addrs_over_100btc".to_string()),
|
||||
_100k_sats: _0satsPattern::new(client.clone(), "addrs_over_100k_sats".to_string()),
|
||||
_100sats: _0satsPattern::new(client.clone(), "addrs_over_100sats".to_string()),
|
||||
_10btc: _0satsPattern::new(client.clone(), "addrs_over_10btc".to_string()),
|
||||
_10k_btc: _0satsPattern::new(client.clone(), "addrs_over_10k_btc".to_string()),
|
||||
_10k_sats: _0satsPattern::new(client.clone(), "addrs_over_10k_sats".to_string()),
|
||||
_10m_sats: _0satsPattern::new(client.clone(), "addrs_over_10m_sats".to_string()),
|
||||
_10sats: _0satsPattern::new(client.clone(), "addrs_over_10sats".to_string()),
|
||||
_1btc: _0satsPattern::new(client.clone(), "addrs_over_1btc".to_string()),
|
||||
_1k_btc: _0satsPattern::new(client.clone(), "addrs_over_1k_btc".to_string()),
|
||||
_1k_sats: _0satsPattern::new(client.clone(), "addrs_over_1k_sats".to_string()),
|
||||
_1m_sats: _0satsPattern::new(client.clone(), "addrs_over_1m_sats".to_string()),
|
||||
_1sat: _0satsPattern::new(client.clone(), "addrs_over_1sat".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3176,27 +3176,27 @@ pub struct MetricsTree_Distribution_UtxoCohorts_AgeRange {
|
||||
impl MetricsTree_Distribution_UtxoCohorts_AgeRange {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
_10y_to_12y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_10y_up_to_12y_old".to_string()),
|
||||
_12y_to_15y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_12y_up_to_15y_old".to_string()),
|
||||
_1d_to_1w: _10yTo12yPattern::new(client.clone(), "utxos_at_least_1d_up_to_1w_old".to_string()),
|
||||
_1h_to_1d: _10yTo12yPattern::new(client.clone(), "utxos_at_least_1h_up_to_1d_old".to_string()),
|
||||
_1m_to_2m: _10yTo12yPattern::new(client.clone(), "utxos_at_least_1m_up_to_2m_old".to_string()),
|
||||
_1w_to_1m: _10yTo12yPattern::new(client.clone(), "utxos_at_least_1w_up_to_1m_old".to_string()),
|
||||
_1y_to_2y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_1y_up_to_2y_old".to_string()),
|
||||
_2m_to_3m: _10yTo12yPattern::new(client.clone(), "utxos_at_least_2m_up_to_3m_old".to_string()),
|
||||
_2y_to_3y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_2y_up_to_3y_old".to_string()),
|
||||
_3m_to_4m: _10yTo12yPattern::new(client.clone(), "utxos_at_least_3m_up_to_4m_old".to_string()),
|
||||
_3y_to_4y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_3y_up_to_4y_old".to_string()),
|
||||
_4m_to_5m: _10yTo12yPattern::new(client.clone(), "utxos_at_least_4m_up_to_5m_old".to_string()),
|
||||
_4y_to_5y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_4y_up_to_5y_old".to_string()),
|
||||
_5m_to_6m: _10yTo12yPattern::new(client.clone(), "utxos_at_least_5m_up_to_6m_old".to_string()),
|
||||
_5y_to_6y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_5y_up_to_6y_old".to_string()),
|
||||
_6m_to_1y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_6m_up_to_1y_old".to_string()),
|
||||
_6y_to_7y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_6y_up_to_7y_old".to_string()),
|
||||
_7y_to_8y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_7y_up_to_8y_old".to_string()),
|
||||
_8y_to_10y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_8y_up_to_10y_old".to_string()),
|
||||
from_15y: _10yTo12yPattern::new(client.clone(), "utxos_at_least_15y_old".to_string()),
|
||||
up_to_1h: _10yTo12yPattern::new(client.clone(), "utxos_up_to_1h_old".to_string()),
|
||||
_10y_to_12y: _10yTo12yPattern::new(client.clone(), "utxos_10y_to_12y_old".to_string()),
|
||||
_12y_to_15y: _10yTo12yPattern::new(client.clone(), "utxos_12y_to_15y_old".to_string()),
|
||||
_1d_to_1w: _10yTo12yPattern::new(client.clone(), "utxos_1d_to_1w_old".to_string()),
|
||||
_1h_to_1d: _10yTo12yPattern::new(client.clone(), "utxos_1h_to_1d_old".to_string()),
|
||||
_1m_to_2m: _10yTo12yPattern::new(client.clone(), "utxos_1m_to_2m_old".to_string()),
|
||||
_1w_to_1m: _10yTo12yPattern::new(client.clone(), "utxos_1w_to_1m_old".to_string()),
|
||||
_1y_to_2y: _10yTo12yPattern::new(client.clone(), "utxos_1y_to_2y_old".to_string()),
|
||||
_2m_to_3m: _10yTo12yPattern::new(client.clone(), "utxos_2m_to_3m_old".to_string()),
|
||||
_2y_to_3y: _10yTo12yPattern::new(client.clone(), "utxos_2y_to_3y_old".to_string()),
|
||||
_3m_to_4m: _10yTo12yPattern::new(client.clone(), "utxos_3m_to_4m_old".to_string()),
|
||||
_3y_to_4y: _10yTo12yPattern::new(client.clone(), "utxos_3y_to_4y_old".to_string()),
|
||||
_4m_to_5m: _10yTo12yPattern::new(client.clone(), "utxos_4m_to_5m_old".to_string()),
|
||||
_4y_to_5y: _10yTo12yPattern::new(client.clone(), "utxos_4y_to_5y_old".to_string()),
|
||||
_5m_to_6m: _10yTo12yPattern::new(client.clone(), "utxos_5m_to_6m_old".to_string()),
|
||||
_5y_to_6y: _10yTo12yPattern::new(client.clone(), "utxos_5y_to_6y_old".to_string()),
|
||||
_6m_to_1y: _10yTo12yPattern::new(client.clone(), "utxos_6m_to_1y_old".to_string()),
|
||||
_6y_to_7y: _10yTo12yPattern::new(client.clone(), "utxos_6y_to_7y_old".to_string()),
|
||||
_7y_to_8y: _10yTo12yPattern::new(client.clone(), "utxos_7y_to_8y_old".to_string()),
|
||||
_8y_to_10y: _10yTo12yPattern::new(client.clone(), "utxos_8y_to_10y_old".to_string()),
|
||||
from_15y: _10yTo12yPattern::new(client.clone(), "utxos_over_15y_old".to_string()),
|
||||
up_to_1h: _10yTo12yPattern::new(client.clone(), "utxos_under_1h_old".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3348,19 +3348,19 @@ pub struct MetricsTree_Distribution_UtxoCohorts_GeAmount {
|
||||
impl MetricsTree_Distribution_UtxoCohorts_GeAmount {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
_100btc: _100btcPattern::new(client.clone(), "utxos_above_100btc".to_string()),
|
||||
_100k_sats: _100btcPattern::new(client.clone(), "utxos_above_100k_sats".to_string()),
|
||||
_100sats: _100btcPattern::new(client.clone(), "utxos_above_100sats".to_string()),
|
||||
_10btc: _100btcPattern::new(client.clone(), "utxos_above_10btc".to_string()),
|
||||
_10k_btc: _100btcPattern::new(client.clone(), "utxos_above_10k_btc".to_string()),
|
||||
_10k_sats: _100btcPattern::new(client.clone(), "utxos_above_10k_sats".to_string()),
|
||||
_10m_sats: _100btcPattern::new(client.clone(), "utxos_above_10m_sats".to_string()),
|
||||
_10sats: _100btcPattern::new(client.clone(), "utxos_above_10sats".to_string()),
|
||||
_1btc: _100btcPattern::new(client.clone(), "utxos_above_1btc".to_string()),
|
||||
_1k_btc: _100btcPattern::new(client.clone(), "utxos_above_1k_btc".to_string()),
|
||||
_1k_sats: _100btcPattern::new(client.clone(), "utxos_above_1k_sats".to_string()),
|
||||
_1m_sats: _100btcPattern::new(client.clone(), "utxos_above_1m_sats".to_string()),
|
||||
_1sat: _100btcPattern::new(client.clone(), "utxos_above_1sat".to_string()),
|
||||
_100btc: _100btcPattern::new(client.clone(), "utxos_over_100btc".to_string()),
|
||||
_100k_sats: _100btcPattern::new(client.clone(), "utxos_over_100k_sats".to_string()),
|
||||
_100sats: _100btcPattern::new(client.clone(), "utxos_over_100sats".to_string()),
|
||||
_10btc: _100btcPattern::new(client.clone(), "utxos_over_10btc".to_string()),
|
||||
_10k_btc: _100btcPattern::new(client.clone(), "utxos_over_10k_btc".to_string()),
|
||||
_10k_sats: _100btcPattern::new(client.clone(), "utxos_over_10k_sats".to_string()),
|
||||
_10m_sats: _100btcPattern::new(client.clone(), "utxos_over_10m_sats".to_string()),
|
||||
_10sats: _100btcPattern::new(client.clone(), "utxos_over_10sats".to_string()),
|
||||
_1btc: _100btcPattern::new(client.clone(), "utxos_over_1btc".to_string()),
|
||||
_1k_btc: _100btcPattern::new(client.clone(), "utxos_over_1k_btc".to_string()),
|
||||
_1k_sats: _100btcPattern::new(client.clone(), "utxos_over_1k_sats".to_string()),
|
||||
_1m_sats: _100btcPattern::new(client.clone(), "utxos_over_1m_sats".to_string()),
|
||||
_1sat: _100btcPattern::new(client.clone(), "utxos_over_1sat".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3427,24 +3427,24 @@ pub struct MetricsTree_Distribution_UtxoCohorts_MaxAge {
|
||||
impl MetricsTree_Distribution_UtxoCohorts_MaxAge {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
_10y: _10yPattern::new(client.clone(), "utxos_up_to_10y_old".to_string()),
|
||||
_12y: _10yPattern::new(client.clone(), "utxos_up_to_12y_old".to_string()),
|
||||
_15y: _10yPattern::new(client.clone(), "utxos_up_to_15y_old".to_string()),
|
||||
_1m: _10yPattern::new(client.clone(), "utxos_up_to_1m_old".to_string()),
|
||||
_1w: _10yPattern::new(client.clone(), "utxos_up_to_1w_old".to_string()),
|
||||
_1y: _10yPattern::new(client.clone(), "utxos_up_to_1y_old".to_string()),
|
||||
_2m: _10yPattern::new(client.clone(), "utxos_up_to_2m_old".to_string()),
|
||||
_2y: _10yPattern::new(client.clone(), "utxos_up_to_2y_old".to_string()),
|
||||
_3m: _10yPattern::new(client.clone(), "utxos_up_to_3m_old".to_string()),
|
||||
_3y: _10yPattern::new(client.clone(), "utxos_up_to_3y_old".to_string()),
|
||||
_4m: _10yPattern::new(client.clone(), "utxos_up_to_4m_old".to_string()),
|
||||
_4y: _10yPattern::new(client.clone(), "utxos_up_to_4y_old".to_string()),
|
||||
_5m: _10yPattern::new(client.clone(), "utxos_up_to_5m_old".to_string()),
|
||||
_5y: _10yPattern::new(client.clone(), "utxos_up_to_5y_old".to_string()),
|
||||
_6m: _10yPattern::new(client.clone(), "utxos_up_to_6m_old".to_string()),
|
||||
_6y: _10yPattern::new(client.clone(), "utxos_up_to_6y_old".to_string()),
|
||||
_7y: _10yPattern::new(client.clone(), "utxos_up_to_7y_old".to_string()),
|
||||
_8y: _10yPattern::new(client.clone(), "utxos_up_to_8y_old".to_string()),
|
||||
_10y: _10yPattern::new(client.clone(), "utxos_under_10y_old".to_string()),
|
||||
_12y: _10yPattern::new(client.clone(), "utxos_under_12y_old".to_string()),
|
||||
_15y: _10yPattern::new(client.clone(), "utxos_under_15y_old".to_string()),
|
||||
_1m: _10yPattern::new(client.clone(), "utxos_under_1m_old".to_string()),
|
||||
_1w: _10yPattern::new(client.clone(), "utxos_under_1w_old".to_string()),
|
||||
_1y: _10yPattern::new(client.clone(), "utxos_under_1y_old".to_string()),
|
||||
_2m: _10yPattern::new(client.clone(), "utxos_under_2m_old".to_string()),
|
||||
_2y: _10yPattern::new(client.clone(), "utxos_under_2y_old".to_string()),
|
||||
_3m: _10yPattern::new(client.clone(), "utxos_under_3m_old".to_string()),
|
||||
_3y: _10yPattern::new(client.clone(), "utxos_under_3y_old".to_string()),
|
||||
_4m: _10yPattern::new(client.clone(), "utxos_under_4m_old".to_string()),
|
||||
_4y: _10yPattern::new(client.clone(), "utxos_under_4y_old".to_string()),
|
||||
_5m: _10yPattern::new(client.clone(), "utxos_under_5m_old".to_string()),
|
||||
_5y: _10yPattern::new(client.clone(), "utxos_under_5y_old".to_string()),
|
||||
_6m: _10yPattern::new(client.clone(), "utxos_under_6m_old".to_string()),
|
||||
_6y: _10yPattern::new(client.clone(), "utxos_under_6y_old".to_string()),
|
||||
_7y: _10yPattern::new(client.clone(), "utxos_under_7y_old".to_string()),
|
||||
_8y: _10yPattern::new(client.clone(), "utxos_under_8y_old".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3474,24 +3474,24 @@ pub struct MetricsTree_Distribution_UtxoCohorts_MinAge {
|
||||
impl MetricsTree_Distribution_UtxoCohorts_MinAge {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
_10y: _100btcPattern::new(client.clone(), "utxos_at_least_10y_old".to_string()),
|
||||
_12y: _100btcPattern::new(client.clone(), "utxos_at_least_12y_old".to_string()),
|
||||
_1d: _100btcPattern::new(client.clone(), "utxos_at_least_1d_old".to_string()),
|
||||
_1m: _100btcPattern::new(client.clone(), "utxos_at_least_1m_old".to_string()),
|
||||
_1w: _100btcPattern::new(client.clone(), "utxos_at_least_1w_old".to_string()),
|
||||
_1y: _100btcPattern::new(client.clone(), "utxos_at_least_1y_old".to_string()),
|
||||
_2m: _100btcPattern::new(client.clone(), "utxos_at_least_2m_old".to_string()),
|
||||
_2y: _100btcPattern::new(client.clone(), "utxos_at_least_2y_old".to_string()),
|
||||
_3m: _100btcPattern::new(client.clone(), "utxos_at_least_3m_old".to_string()),
|
||||
_3y: _100btcPattern::new(client.clone(), "utxos_at_least_3y_old".to_string()),
|
||||
_4m: _100btcPattern::new(client.clone(), "utxos_at_least_4m_old".to_string()),
|
||||
_4y: _100btcPattern::new(client.clone(), "utxos_at_least_4y_old".to_string()),
|
||||
_5m: _100btcPattern::new(client.clone(), "utxos_at_least_5m_old".to_string()),
|
||||
_5y: _100btcPattern::new(client.clone(), "utxos_at_least_5y_old".to_string()),
|
||||
_6m: _100btcPattern::new(client.clone(), "utxos_at_least_6m_old".to_string()),
|
||||
_6y: _100btcPattern::new(client.clone(), "utxos_at_least_6y_old".to_string()),
|
||||
_7y: _100btcPattern::new(client.clone(), "utxos_at_least_7y_old".to_string()),
|
||||
_8y: _100btcPattern::new(client.clone(), "utxos_at_least_8y_old".to_string()),
|
||||
_10y: _100btcPattern::new(client.clone(), "utxos_over_10y_old".to_string()),
|
||||
_12y: _100btcPattern::new(client.clone(), "utxos_over_12y_old".to_string()),
|
||||
_1d: _100btcPattern::new(client.clone(), "utxos_over_1d_old".to_string()),
|
||||
_1m: _100btcPattern::new(client.clone(), "utxos_over_1m_old".to_string()),
|
||||
_1w: _100btcPattern::new(client.clone(), "utxos_over_1w_old".to_string()),
|
||||
_1y: _100btcPattern::new(client.clone(), "utxos_over_1y_old".to_string()),
|
||||
_2m: _100btcPattern::new(client.clone(), "utxos_over_2m_old".to_string()),
|
||||
_2y: _100btcPattern::new(client.clone(), "utxos_over_2y_old".to_string()),
|
||||
_3m: _100btcPattern::new(client.clone(), "utxos_over_3m_old".to_string()),
|
||||
_3y: _100btcPattern::new(client.clone(), "utxos_over_3y_old".to_string()),
|
||||
_4m: _100btcPattern::new(client.clone(), "utxos_over_4m_old".to_string()),
|
||||
_4y: _100btcPattern::new(client.clone(), "utxos_over_4y_old".to_string()),
|
||||
_5m: _100btcPattern::new(client.clone(), "utxos_over_5m_old".to_string()),
|
||||
_5y: _100btcPattern::new(client.clone(), "utxos_over_5y_old".to_string()),
|
||||
_6m: _100btcPattern::new(client.clone(), "utxos_over_6m_old".to_string()),
|
||||
_6y: _100btcPattern::new(client.clone(), "utxos_over_6y_old".to_string()),
|
||||
_7y: _100btcPattern::new(client.clone(), "utxos_over_7y_old".to_string()),
|
||||
_8y: _100btcPattern::new(client.clone(), "utxos_over_8y_old".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4204,8 +4204,8 @@ impl MetricsTree_Market_Ath {
|
||||
|
||||
/// Metrics tree node.
|
||||
pub struct MetricsTree_Market_Dca {
|
||||
pub class_average_price: MetricsTree_Market_Dca_ClassAveragePrice,
|
||||
pub class_returns: ClassAveragePricePattern<StoredF32>,
|
||||
pub class_average_price: ClassAveragePricePattern<Dollars>,
|
||||
pub class_returns: MetricsTree_Market_Dca_ClassReturns,
|
||||
pub class_stack: MetricsTree_Market_Dca_ClassStack,
|
||||
pub period_average_price: PeriodAveragePricePattern<Dollars>,
|
||||
pub period_cagr: PeriodCagrPattern,
|
||||
@@ -4217,8 +4217,8 @@ pub struct MetricsTree_Market_Dca {
|
||||
impl MetricsTree_Market_Dca {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
class_average_price: MetricsTree_Market_Dca_ClassAveragePrice::new(client.clone(), format!("{base_path}_class_average_price")),
|
||||
class_returns: ClassAveragePricePattern::new(client.clone(), "dca_class".to_string()),
|
||||
class_average_price: ClassAveragePricePattern::new(client.clone(), "dca_class".to_string()),
|
||||
class_returns: MetricsTree_Market_Dca_ClassReturns::new(client.clone(), format!("{base_path}_class_returns")),
|
||||
class_stack: MetricsTree_Market_Dca_ClassStack::new(client.clone(), format!("{base_path}_class_stack")),
|
||||
period_average_price: PeriodAveragePricePattern::new(client.clone(), "dca_average_price".to_string()),
|
||||
period_cagr: PeriodCagrPattern::new(client.clone(), "dca_cagr".to_string()),
|
||||
@@ -4230,36 +4230,36 @@ impl MetricsTree_Market_Dca {
|
||||
}
|
||||
|
||||
/// Metrics tree node.
|
||||
pub struct MetricsTree_Market_Dca_ClassAveragePrice {
|
||||
pub _2015: MetricPattern4<Dollars>,
|
||||
pub _2016: MetricPattern4<Dollars>,
|
||||
pub _2017: MetricPattern4<Dollars>,
|
||||
pub _2018: MetricPattern4<Dollars>,
|
||||
pub _2019: MetricPattern4<Dollars>,
|
||||
pub _2020: MetricPattern4<Dollars>,
|
||||
pub _2021: MetricPattern4<Dollars>,
|
||||
pub _2022: MetricPattern4<Dollars>,
|
||||
pub _2023: MetricPattern4<Dollars>,
|
||||
pub _2024: MetricPattern4<Dollars>,
|
||||
pub _2025: MetricPattern4<Dollars>,
|
||||
pub _2026: MetricPattern4<Dollars>,
|
||||
pub struct MetricsTree_Market_Dca_ClassReturns {
|
||||
pub _2015: MetricPattern4<StoredF32>,
|
||||
pub _2016: MetricPattern4<StoredF32>,
|
||||
pub _2017: MetricPattern4<StoredF32>,
|
||||
pub _2018: MetricPattern4<StoredF32>,
|
||||
pub _2019: MetricPattern4<StoredF32>,
|
||||
pub _2020: MetricPattern4<StoredF32>,
|
||||
pub _2021: MetricPattern4<StoredF32>,
|
||||
pub _2022: MetricPattern4<StoredF32>,
|
||||
pub _2023: MetricPattern4<StoredF32>,
|
||||
pub _2024: MetricPattern4<StoredF32>,
|
||||
pub _2025: MetricPattern4<StoredF32>,
|
||||
pub _2026: MetricPattern4<StoredF32>,
|
||||
}
|
||||
|
||||
impl MetricsTree_Market_Dca_ClassAveragePrice {
|
||||
impl MetricsTree_Market_Dca_ClassReturns {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
_2015: MetricPattern4::new(client.clone(), "dca_class_2015_average_price".to_string()),
|
||||
_2016: MetricPattern4::new(client.clone(), "dca_class_2016_average_price".to_string()),
|
||||
_2017: MetricPattern4::new(client.clone(), "dca_class_2017_average_price".to_string()),
|
||||
_2018: MetricPattern4::new(client.clone(), "dca_class_2018_average_price".to_string()),
|
||||
_2019: MetricPattern4::new(client.clone(), "dca_class_2019_average_price".to_string()),
|
||||
_2020: MetricPattern4::new(client.clone(), "dca_class_2020_average_price".to_string()),
|
||||
_2021: MetricPattern4::new(client.clone(), "dca_class_2021_average_price".to_string()),
|
||||
_2022: MetricPattern4::new(client.clone(), "dca_class_2022_average_price".to_string()),
|
||||
_2023: MetricPattern4::new(client.clone(), "dca_class_2023_average_price".to_string()),
|
||||
_2024: MetricPattern4::new(client.clone(), "dca_class_2024_average_price".to_string()),
|
||||
_2025: MetricPattern4::new(client.clone(), "dca_class_2025_average_price".to_string()),
|
||||
_2026: MetricPattern4::new(client.clone(), "dca_class_2026_average_price".to_string()),
|
||||
_2015: MetricPattern4::new(client.clone(), "dca_class_2015_returns".to_string()),
|
||||
_2016: MetricPattern4::new(client.clone(), "dca_class_2016_returns".to_string()),
|
||||
_2017: MetricPattern4::new(client.clone(), "dca_class_2017_returns".to_string()),
|
||||
_2018: MetricPattern4::new(client.clone(), "dca_class_2018_returns".to_string()),
|
||||
_2019: MetricPattern4::new(client.clone(), "dca_class_2019_returns".to_string()),
|
||||
_2020: MetricPattern4::new(client.clone(), "dca_class_2020_returns".to_string()),
|
||||
_2021: MetricPattern4::new(client.clone(), "dca_class_2021_returns".to_string()),
|
||||
_2022: MetricPattern4::new(client.clone(), "dca_class_2022_returns".to_string()),
|
||||
_2023: MetricPattern4::new(client.clone(), "dca_class_2023_returns".to_string()),
|
||||
_2024: MetricPattern4::new(client.clone(), "dca_class_2024_returns".to_string()),
|
||||
_2025: MetricPattern4::new(client.clone(), "dca_class_2025_returns".to_string()),
|
||||
_2026: MetricPattern4::new(client.clone(), "dca_class_2026_returns".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5337,7 +5337,7 @@ impl MetricsTree_Transactions_Fees {
|
||||
/// Metrics tree node.
|
||||
pub struct MetricsTree_Transactions_Fees_Fee {
|
||||
pub bitcoin: CountPattern2<Bitcoin>,
|
||||
pub dollars: MetricsTree_Transactions_Fees_Fee_Dollars,
|
||||
pub dollars: CountPattern2<Dollars>,
|
||||
pub sats: CountPattern2<Sats>,
|
||||
pub txindex: MetricPattern27<Sats>,
|
||||
}
|
||||
@@ -5346,46 +5346,13 @@ impl MetricsTree_Transactions_Fees_Fee {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
bitcoin: CountPattern2::new(client.clone(), "fee_btc".to_string()),
|
||||
dollars: MetricsTree_Transactions_Fees_Fee_Dollars::new(client.clone(), format!("{base_path}_dollars")),
|
||||
dollars: CountPattern2::new(client.clone(), "fee_usd".to_string()),
|
||||
sats: CountPattern2::new(client.clone(), "fee".to_string()),
|
||||
txindex: MetricPattern27::new(client.clone(), "fee".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Metrics tree node.
|
||||
pub struct MetricsTree_Transactions_Fees_Fee_Dollars {
|
||||
pub average: MetricPattern1<Dollars>,
|
||||
pub cumulative: MetricPattern2<Dollars>,
|
||||
pub height_cumulative: MetricPattern11<Dollars>,
|
||||
pub max: MetricPattern1<Dollars>,
|
||||
pub median: MetricPattern11<Dollars>,
|
||||
pub min: MetricPattern1<Dollars>,
|
||||
pub pct10: MetricPattern11<Dollars>,
|
||||
pub pct25: MetricPattern11<Dollars>,
|
||||
pub pct75: MetricPattern11<Dollars>,
|
||||
pub pct90: MetricPattern11<Dollars>,
|
||||
pub sum: MetricPattern1<Dollars>,
|
||||
}
|
||||
|
||||
impl MetricsTree_Transactions_Fees_Fee_Dollars {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
average: MetricPattern1::new(client.clone(), "fee_usd_average".to_string()),
|
||||
cumulative: MetricPattern2::new(client.clone(), "fee_usd_cumulative".to_string()),
|
||||
height_cumulative: MetricPattern11::new(client.clone(), "fee_usd_cumulative".to_string()),
|
||||
max: MetricPattern1::new(client.clone(), "fee_usd_max".to_string()),
|
||||
median: MetricPattern11::new(client.clone(), "fee_usd_median".to_string()),
|
||||
min: MetricPattern1::new(client.clone(), "fee_usd_min".to_string()),
|
||||
pct10: MetricPattern11::new(client.clone(), "fee_usd_pct10".to_string()),
|
||||
pct25: MetricPattern11::new(client.clone(), "fee_usd_pct25".to_string()),
|
||||
pct75: MetricPattern11::new(client.clone(), "fee_usd_pct75".to_string()),
|
||||
pct90: MetricPattern11::new(client.clone(), "fee_usd_pct90".to_string()),
|
||||
sum: MetricPattern1::new(client.clone(), "fee_usd_sum".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Metrics tree node.
|
||||
pub struct MetricsTree_Transactions_Size {
|
||||
pub vsize: FeeRatePattern<VSize>,
|
||||
|
||||
@@ -43,6 +43,7 @@ pub struct ValueDollarsFromTxFull {
|
||||
pub txindex: LazyDollarsTxIndex,
|
||||
#[traversable(flatten)]
|
||||
pub height: LazyDollarsHeightFull,
|
||||
#[traversable(rename = "cumulative")]
|
||||
pub height_cumulative: CumulativeVec<Height, Dollars>,
|
||||
pub difficultyepoch: LazyFull<DifficultyEpoch, Dollars, Height, DifficultyEpoch>,
|
||||
pub dateindex: Stats<DateIndex, Dollars>,
|
||||
|
||||
+391
-418
File diff suppressed because it is too large
Load Diff
@@ -2054,24 +2054,6 @@ class PeriodLumpSumStackPattern:
|
||||
self._6y: _2015Pattern = _2015Pattern(client, _p('6y', acc))
|
||||
self._8y: _2015Pattern = _2015Pattern(client, _p('8y', acc))
|
||||
|
||||
class ClassAveragePricePattern(Generic[T]):
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self._2015: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2015_returns'))
|
||||
self._2016: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2016_returns'))
|
||||
self._2017: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2017_returns'))
|
||||
self._2018: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2018_returns'))
|
||||
self._2019: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2019_returns'))
|
||||
self._2020: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2020_returns'))
|
||||
self._2021: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2021_returns'))
|
||||
self._2022: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2022_returns'))
|
||||
self._2023: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2023_returns'))
|
||||
self._2024: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2024_returns'))
|
||||
self._2025: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2025_returns'))
|
||||
self._2026: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2026_returns'))
|
||||
|
||||
class PeriodAveragePricePattern(Generic[T]):
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -2090,6 +2072,24 @@ class PeriodAveragePricePattern(Generic[T]):
|
||||
self._6y: MetricPattern4[T] = MetricPattern4(client, _p('6y', acc))
|
||||
self._8y: MetricPattern4[T] = MetricPattern4(client, _p('8y', acc))
|
||||
|
||||
class ClassAveragePricePattern(Generic[T]):
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self._2015: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2015_average_price'))
|
||||
self._2016: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2016_average_price'))
|
||||
self._2017: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2017_average_price'))
|
||||
self._2018: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2018_average_price'))
|
||||
self._2019: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2019_average_price'))
|
||||
self._2020: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2020_average_price'))
|
||||
self._2021: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2021_average_price'))
|
||||
self._2022: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2022_average_price'))
|
||||
self._2023: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2023_average_price'))
|
||||
self._2024: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2024_average_price'))
|
||||
self._2025: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2025_average_price'))
|
||||
self._2026: MetricPattern4[T] = MetricPattern4(client, _m(acc, '2026_average_price'))
|
||||
|
||||
class BitcoinPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -2245,6 +2245,32 @@ class PhaseDailyCentsPattern(Generic[T]):
|
||||
self.pct75: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'pct75'))
|
||||
self.pct90: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'pct90'))
|
||||
|
||||
class _100btcPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self.activity: ActivityPattern2 = ActivityPattern2(client, acc)
|
||||
self.cost_basis: CostBasisPattern = CostBasisPattern(client, acc)
|
||||
self.outputs: OutputsPattern = OutputsPattern(client, _m(acc, 'utxo_count'))
|
||||
self.realized: RealizedPattern = RealizedPattern(client, acc)
|
||||
self.relative: RelativePattern = RelativePattern(client, acc)
|
||||
self.supply: SupplyPattern2 = SupplyPattern2(client, _m(acc, 'supply'))
|
||||
self.unrealized: UnrealizedPattern = UnrealizedPattern(client, acc)
|
||||
|
||||
class PeriodCagrPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self._10y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('10y', acc))
|
||||
self._2y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('2y', acc))
|
||||
self._3y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('3y', acc))
|
||||
self._4y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('4y', acc))
|
||||
self._5y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('5y', acc))
|
||||
self._6y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('6y', acc))
|
||||
self._8y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('8y', acc))
|
||||
|
||||
class _0satsPattern2:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -2271,19 +2297,6 @@ class _10yTo12yPattern:
|
||||
self.supply: SupplyPattern2 = SupplyPattern2(client, _m(acc, 'supply'))
|
||||
self.unrealized: UnrealizedPattern = UnrealizedPattern(client, acc)
|
||||
|
||||
class PeriodCagrPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self._10y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('10y', acc))
|
||||
self._2y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('2y', acc))
|
||||
self._3y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('3y', acc))
|
||||
self._4y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('4y', acc))
|
||||
self._5y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('5y', acc))
|
||||
self._6y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('6y', acc))
|
||||
self._8y: MetricPattern4[StoredF32] = MetricPattern4(client, _p('8y', acc))
|
||||
|
||||
class UnrealizedPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -2310,19 +2323,6 @@ class _10yPattern:
|
||||
self.supply: SupplyPattern2 = SupplyPattern2(client, _m(acc, 'supply'))
|
||||
self.unrealized: UnrealizedPattern = UnrealizedPattern(client, acc)
|
||||
|
||||
class _100btcPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self.activity: ActivityPattern2 = ActivityPattern2(client, acc)
|
||||
self.cost_basis: CostBasisPattern = CostBasisPattern(client, acc)
|
||||
self.outputs: OutputsPattern = OutputsPattern(client, _m(acc, 'utxo_count'))
|
||||
self.realized: RealizedPattern = RealizedPattern(client, acc)
|
||||
self.relative: RelativePattern = RelativePattern(client, acc)
|
||||
self.supply: SupplyPattern2 = SupplyPattern2(client, _m(acc, 'supply'))
|
||||
self.unrealized: UnrealizedPattern = UnrealizedPattern(client, acc)
|
||||
|
||||
class ActivityPattern2:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -2344,15 +2344,6 @@ class SplitPattern2(Generic[T]):
|
||||
self.low: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'low'))
|
||||
self.open: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'open'))
|
||||
|
||||
class _2015Pattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self.bitcoin: MetricPattern4[Bitcoin] = MetricPattern4(client, _m(acc, 'btc'))
|
||||
self.dollars: MetricPattern4[Dollars] = MetricPattern4(client, _m(acc, 'usd'))
|
||||
self.sats: MetricPattern4[Sats] = MetricPattern4(client, acc)
|
||||
|
||||
class CostBasisPattern2:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -2380,15 +2371,6 @@ class CoinbasePattern2:
|
||||
self.dollars: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'usd'))
|
||||
self.sats: BlockCountPattern[Sats] = BlockCountPattern(client, acc)
|
||||
|
||||
class SegwitAdoptionPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self.base: MetricPattern11[StoredF32] = MetricPattern11(client, acc)
|
||||
self.cumulative: MetricPattern2[StoredF32] = MetricPattern2(client, _m(acc, 'cumulative'))
|
||||
self.sum: MetricPattern2[StoredF32] = MetricPattern2(client, _m(acc, 'sum'))
|
||||
|
||||
class ActiveSupplyPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -2398,6 +2380,15 @@ class ActiveSupplyPattern:
|
||||
self.dollars: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'usd'))
|
||||
self.sats: MetricPattern1[Sats] = MetricPattern1(client, acc)
|
||||
|
||||
class SegwitAdoptionPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self.base: MetricPattern11[StoredF32] = MetricPattern11(client, acc)
|
||||
self.cumulative: MetricPattern2[StoredF32] = MetricPattern2(client, _m(acc, 'cumulative'))
|
||||
self.sum: MetricPattern2[StoredF32] = MetricPattern2(client, _m(acc, 'sum'))
|
||||
|
||||
class UnclaimedRewardsPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -2407,6 +2398,15 @@ class UnclaimedRewardsPattern:
|
||||
self.dollars: BlockCountPattern[Dollars] = BlockCountPattern(client, _m(acc, 'usd'))
|
||||
self.sats: BlockCountPattern[Sats] = BlockCountPattern(client, acc)
|
||||
|
||||
class _2015Pattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self.bitcoin: MetricPattern4[Bitcoin] = MetricPattern4(client, _m(acc, 'btc'))
|
||||
self.dollars: MetricPattern4[Dollars] = MetricPattern4(client, _m(acc, 'usd'))
|
||||
self.sats: MetricPattern4[Sats] = MetricPattern4(client, acc)
|
||||
|
||||
class SupplyPattern2:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -2439,13 +2439,13 @@ class _1dReturns1mSdPattern:
|
||||
self.sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'sd'))
|
||||
self.sma: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'sma'))
|
||||
|
||||
class SatsPattern(Generic[T]):
|
||||
class BitcoinPattern2(Generic[T]):
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self.ohlc: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'ohlc'))
|
||||
self.split: SplitPattern2[T] = SplitPattern2(client, acc)
|
||||
self.cumulative: MetricPattern2[T] = MetricPattern2(client, _m(acc, 'cumulative'))
|
||||
self.sum: MetricPattern1[T] = MetricPattern1(client, acc)
|
||||
|
||||
class BlockCountPattern(Generic[T]):
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
@@ -2455,13 +2455,13 @@ class BlockCountPattern(Generic[T]):
|
||||
self.cumulative: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'cumulative'))
|
||||
self.sum: MetricPattern1[T] = MetricPattern1(client, acc)
|
||||
|
||||
class BitcoinPattern2(Generic[T]):
|
||||
class SatsPattern(Generic[T]):
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, acc: str):
|
||||
"""Create pattern node with accumulated metric name."""
|
||||
self.cumulative: MetricPattern2[T] = MetricPattern2(client, _m(acc, 'cumulative'))
|
||||
self.sum: MetricPattern1[T] = MetricPattern1(client, acc)
|
||||
self.ohlc: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'ohlc'))
|
||||
self.split: SplitPattern2[T] = SplitPattern2(client, acc)
|
||||
|
||||
class RealizedPriceExtraPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
@@ -2739,19 +2739,19 @@ class MetricsTree_Distribution_AddressCohorts_GeAmount:
|
||||
"""Metrics tree node."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||
self._100btc: _0satsPattern = _0satsPattern(client, 'addrs_above_100btc')
|
||||
self._100k_sats: _0satsPattern = _0satsPattern(client, 'addrs_above_100k_sats')
|
||||
self._100sats: _0satsPattern = _0satsPattern(client, 'addrs_above_100sats')
|
||||
self._10btc: _0satsPattern = _0satsPattern(client, 'addrs_above_10btc')
|
||||
self._10k_btc: _0satsPattern = _0satsPattern(client, 'addrs_above_10k_btc')
|
||||
self._10k_sats: _0satsPattern = _0satsPattern(client, 'addrs_above_10k_sats')
|
||||
self._10m_sats: _0satsPattern = _0satsPattern(client, 'addrs_above_10m_sats')
|
||||
self._10sats: _0satsPattern = _0satsPattern(client, 'addrs_above_10sats')
|
||||
self._1btc: _0satsPattern = _0satsPattern(client, 'addrs_above_1btc')
|
||||
self._1k_btc: _0satsPattern = _0satsPattern(client, 'addrs_above_1k_btc')
|
||||
self._1k_sats: _0satsPattern = _0satsPattern(client, 'addrs_above_1k_sats')
|
||||
self._1m_sats: _0satsPattern = _0satsPattern(client, 'addrs_above_1m_sats')
|
||||
self._1sat: _0satsPattern = _0satsPattern(client, 'addrs_above_1sat')
|
||||
self._100btc: _0satsPattern = _0satsPattern(client, 'addrs_over_100btc')
|
||||
self._100k_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_100k_sats')
|
||||
self._100sats: _0satsPattern = _0satsPattern(client, 'addrs_over_100sats')
|
||||
self._10btc: _0satsPattern = _0satsPattern(client, 'addrs_over_10btc')
|
||||
self._10k_btc: _0satsPattern = _0satsPattern(client, 'addrs_over_10k_btc')
|
||||
self._10k_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_10k_sats')
|
||||
self._10m_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_10m_sats')
|
||||
self._10sats: _0satsPattern = _0satsPattern(client, 'addrs_over_10sats')
|
||||
self._1btc: _0satsPattern = _0satsPattern(client, 'addrs_over_1btc')
|
||||
self._1k_btc: _0satsPattern = _0satsPattern(client, 'addrs_over_1k_btc')
|
||||
self._1k_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_1k_sats')
|
||||
self._1m_sats: _0satsPattern = _0satsPattern(client, 'addrs_over_1m_sats')
|
||||
self._1sat: _0satsPattern = _0satsPattern(client, 'addrs_over_1sat')
|
||||
|
||||
class MetricsTree_Distribution_AddressCohorts_LtAmount:
|
||||
"""Metrics tree node."""
|
||||
@@ -2803,27 +2803,27 @@ class MetricsTree_Distribution_UtxoCohorts_AgeRange:
|
||||
"""Metrics tree node."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||
self._10y_to_12y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_10y_up_to_12y_old')
|
||||
self._12y_to_15y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_12y_up_to_15y_old')
|
||||
self._1d_to_1w: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_1d_up_to_1w_old')
|
||||
self._1h_to_1d: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_1h_up_to_1d_old')
|
||||
self._1m_to_2m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_1m_up_to_2m_old')
|
||||
self._1w_to_1m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_1w_up_to_1m_old')
|
||||
self._1y_to_2y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_1y_up_to_2y_old')
|
||||
self._2m_to_3m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_2m_up_to_3m_old')
|
||||
self._2y_to_3y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_2y_up_to_3y_old')
|
||||
self._3m_to_4m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_3m_up_to_4m_old')
|
||||
self._3y_to_4y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_3y_up_to_4y_old')
|
||||
self._4m_to_5m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_4m_up_to_5m_old')
|
||||
self._4y_to_5y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_4y_up_to_5y_old')
|
||||
self._5m_to_6m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_5m_up_to_6m_old')
|
||||
self._5y_to_6y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_5y_up_to_6y_old')
|
||||
self._6m_to_1y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_6m_up_to_1y_old')
|
||||
self._6y_to_7y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_6y_up_to_7y_old')
|
||||
self._7y_to_8y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_7y_up_to_8y_old')
|
||||
self._8y_to_10y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_8y_up_to_10y_old')
|
||||
self.from_15y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_at_least_15y_old')
|
||||
self.up_to_1h: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_up_to_1h_old')
|
||||
self._10y_to_12y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_10y_to_12y_old')
|
||||
self._12y_to_15y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_12y_to_15y_old')
|
||||
self._1d_to_1w: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1d_to_1w_old')
|
||||
self._1h_to_1d: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1h_to_1d_old')
|
||||
self._1m_to_2m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1m_to_2m_old')
|
||||
self._1w_to_1m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1w_to_1m_old')
|
||||
self._1y_to_2y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_1y_to_2y_old')
|
||||
self._2m_to_3m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_2m_to_3m_old')
|
||||
self._2y_to_3y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_2y_to_3y_old')
|
||||
self._3m_to_4m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_3m_to_4m_old')
|
||||
self._3y_to_4y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_3y_to_4y_old')
|
||||
self._4m_to_5m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_4m_to_5m_old')
|
||||
self._4y_to_5y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_4y_to_5y_old')
|
||||
self._5m_to_6m: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_5m_to_6m_old')
|
||||
self._5y_to_6y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_5y_to_6y_old')
|
||||
self._6m_to_1y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_6m_to_1y_old')
|
||||
self._6y_to_7y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_6y_to_7y_old')
|
||||
self._7y_to_8y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_7y_to_8y_old')
|
||||
self._8y_to_10y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_8y_to_10y_old')
|
||||
self.from_15y: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_over_15y_old')
|
||||
self.up_to_1h: _10yTo12yPattern = _10yTo12yPattern(client, 'utxos_under_1h_old')
|
||||
|
||||
class MetricsTree_Distribution_UtxoCohorts_All_CostBasis:
|
||||
"""Metrics tree node."""
|
||||
@@ -2890,19 +2890,19 @@ class MetricsTree_Distribution_UtxoCohorts_GeAmount:
|
||||
"""Metrics tree node."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||
self._100btc: _100btcPattern = _100btcPattern(client, 'utxos_above_100btc')
|
||||
self._100k_sats: _100btcPattern = _100btcPattern(client, 'utxos_above_100k_sats')
|
||||
self._100sats: _100btcPattern = _100btcPattern(client, 'utxos_above_100sats')
|
||||
self._10btc: _100btcPattern = _100btcPattern(client, 'utxos_above_10btc')
|
||||
self._10k_btc: _100btcPattern = _100btcPattern(client, 'utxos_above_10k_btc')
|
||||
self._10k_sats: _100btcPattern = _100btcPattern(client, 'utxos_above_10k_sats')
|
||||
self._10m_sats: _100btcPattern = _100btcPattern(client, 'utxos_above_10m_sats')
|
||||
self._10sats: _100btcPattern = _100btcPattern(client, 'utxos_above_10sats')
|
||||
self._1btc: _100btcPattern = _100btcPattern(client, 'utxos_above_1btc')
|
||||
self._1k_btc: _100btcPattern = _100btcPattern(client, 'utxos_above_1k_btc')
|
||||
self._1k_sats: _100btcPattern = _100btcPattern(client, 'utxos_above_1k_sats')
|
||||
self._1m_sats: _100btcPattern = _100btcPattern(client, 'utxos_above_1m_sats')
|
||||
self._1sat: _100btcPattern = _100btcPattern(client, 'utxos_above_1sat')
|
||||
self._100btc: _100btcPattern = _100btcPattern(client, 'utxos_over_100btc')
|
||||
self._100k_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_100k_sats')
|
||||
self._100sats: _100btcPattern = _100btcPattern(client, 'utxos_over_100sats')
|
||||
self._10btc: _100btcPattern = _100btcPattern(client, 'utxos_over_10btc')
|
||||
self._10k_btc: _100btcPattern = _100btcPattern(client, 'utxos_over_10k_btc')
|
||||
self._10k_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_10k_sats')
|
||||
self._10m_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_10m_sats')
|
||||
self._10sats: _100btcPattern = _100btcPattern(client, 'utxos_over_10sats')
|
||||
self._1btc: _100btcPattern = _100btcPattern(client, 'utxos_over_1btc')
|
||||
self._1k_btc: _100btcPattern = _100btcPattern(client, 'utxos_over_1k_btc')
|
||||
self._1k_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_1k_sats')
|
||||
self._1m_sats: _100btcPattern = _100btcPattern(client, 'utxos_over_1m_sats')
|
||||
self._1sat: _100btcPattern = _100btcPattern(client, 'utxos_over_1sat')
|
||||
|
||||
class MetricsTree_Distribution_UtxoCohorts_LtAmount:
|
||||
"""Metrics tree node."""
|
||||
@@ -2926,47 +2926,47 @@ class MetricsTree_Distribution_UtxoCohorts_MaxAge:
|
||||
"""Metrics tree node."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||
self._10y: _10yPattern = _10yPattern(client, 'utxos_up_to_10y_old')
|
||||
self._12y: _10yPattern = _10yPattern(client, 'utxos_up_to_12y_old')
|
||||
self._15y: _10yPattern = _10yPattern(client, 'utxos_up_to_15y_old')
|
||||
self._1m: _10yPattern = _10yPattern(client, 'utxos_up_to_1m_old')
|
||||
self._1w: _10yPattern = _10yPattern(client, 'utxos_up_to_1w_old')
|
||||
self._1y: _10yPattern = _10yPattern(client, 'utxos_up_to_1y_old')
|
||||
self._2m: _10yPattern = _10yPattern(client, 'utxos_up_to_2m_old')
|
||||
self._2y: _10yPattern = _10yPattern(client, 'utxos_up_to_2y_old')
|
||||
self._3m: _10yPattern = _10yPattern(client, 'utxos_up_to_3m_old')
|
||||
self._3y: _10yPattern = _10yPattern(client, 'utxos_up_to_3y_old')
|
||||
self._4m: _10yPattern = _10yPattern(client, 'utxos_up_to_4m_old')
|
||||
self._4y: _10yPattern = _10yPattern(client, 'utxos_up_to_4y_old')
|
||||
self._5m: _10yPattern = _10yPattern(client, 'utxos_up_to_5m_old')
|
||||
self._5y: _10yPattern = _10yPattern(client, 'utxos_up_to_5y_old')
|
||||
self._6m: _10yPattern = _10yPattern(client, 'utxos_up_to_6m_old')
|
||||
self._6y: _10yPattern = _10yPattern(client, 'utxos_up_to_6y_old')
|
||||
self._7y: _10yPattern = _10yPattern(client, 'utxos_up_to_7y_old')
|
||||
self._8y: _10yPattern = _10yPattern(client, 'utxos_up_to_8y_old')
|
||||
self._10y: _10yPattern = _10yPattern(client, 'utxos_under_10y_old')
|
||||
self._12y: _10yPattern = _10yPattern(client, 'utxos_under_12y_old')
|
||||
self._15y: _10yPattern = _10yPattern(client, 'utxos_under_15y_old')
|
||||
self._1m: _10yPattern = _10yPattern(client, 'utxos_under_1m_old')
|
||||
self._1w: _10yPattern = _10yPattern(client, 'utxos_under_1w_old')
|
||||
self._1y: _10yPattern = _10yPattern(client, 'utxos_under_1y_old')
|
||||
self._2m: _10yPattern = _10yPattern(client, 'utxos_under_2m_old')
|
||||
self._2y: _10yPattern = _10yPattern(client, 'utxos_under_2y_old')
|
||||
self._3m: _10yPattern = _10yPattern(client, 'utxos_under_3m_old')
|
||||
self._3y: _10yPattern = _10yPattern(client, 'utxos_under_3y_old')
|
||||
self._4m: _10yPattern = _10yPattern(client, 'utxos_under_4m_old')
|
||||
self._4y: _10yPattern = _10yPattern(client, 'utxos_under_4y_old')
|
||||
self._5m: _10yPattern = _10yPattern(client, 'utxos_under_5m_old')
|
||||
self._5y: _10yPattern = _10yPattern(client, 'utxos_under_5y_old')
|
||||
self._6m: _10yPattern = _10yPattern(client, 'utxos_under_6m_old')
|
||||
self._6y: _10yPattern = _10yPattern(client, 'utxos_under_6y_old')
|
||||
self._7y: _10yPattern = _10yPattern(client, 'utxos_under_7y_old')
|
||||
self._8y: _10yPattern = _10yPattern(client, 'utxos_under_8y_old')
|
||||
|
||||
class MetricsTree_Distribution_UtxoCohorts_MinAge:
|
||||
"""Metrics tree node."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||
self._10y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_10y_old')
|
||||
self._12y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_12y_old')
|
||||
self._1d: _100btcPattern = _100btcPattern(client, 'utxos_at_least_1d_old')
|
||||
self._1m: _100btcPattern = _100btcPattern(client, 'utxos_at_least_1m_old')
|
||||
self._1w: _100btcPattern = _100btcPattern(client, 'utxos_at_least_1w_old')
|
||||
self._1y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_1y_old')
|
||||
self._2m: _100btcPattern = _100btcPattern(client, 'utxos_at_least_2m_old')
|
||||
self._2y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_2y_old')
|
||||
self._3m: _100btcPattern = _100btcPattern(client, 'utxos_at_least_3m_old')
|
||||
self._3y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_3y_old')
|
||||
self._4m: _100btcPattern = _100btcPattern(client, 'utxos_at_least_4m_old')
|
||||
self._4y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_4y_old')
|
||||
self._5m: _100btcPattern = _100btcPattern(client, 'utxos_at_least_5m_old')
|
||||
self._5y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_5y_old')
|
||||
self._6m: _100btcPattern = _100btcPattern(client, 'utxos_at_least_6m_old')
|
||||
self._6y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_6y_old')
|
||||
self._7y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_7y_old')
|
||||
self._8y: _100btcPattern = _100btcPattern(client, 'utxos_at_least_8y_old')
|
||||
self._10y: _100btcPattern = _100btcPattern(client, 'utxos_over_10y_old')
|
||||
self._12y: _100btcPattern = _100btcPattern(client, 'utxos_over_12y_old')
|
||||
self._1d: _100btcPattern = _100btcPattern(client, 'utxos_over_1d_old')
|
||||
self._1m: _100btcPattern = _100btcPattern(client, 'utxos_over_1m_old')
|
||||
self._1w: _100btcPattern = _100btcPattern(client, 'utxos_over_1w_old')
|
||||
self._1y: _100btcPattern = _100btcPattern(client, 'utxos_over_1y_old')
|
||||
self._2m: _100btcPattern = _100btcPattern(client, 'utxos_over_2m_old')
|
||||
self._2y: _100btcPattern = _100btcPattern(client, 'utxos_over_2y_old')
|
||||
self._3m: _100btcPattern = _100btcPattern(client, 'utxos_over_3m_old')
|
||||
self._3y: _100btcPattern = _100btcPattern(client, 'utxos_over_3y_old')
|
||||
self._4m: _100btcPattern = _100btcPattern(client, 'utxos_over_4m_old')
|
||||
self._4y: _100btcPattern = _100btcPattern(client, 'utxos_over_4y_old')
|
||||
self._5m: _100btcPattern = _100btcPattern(client, 'utxos_over_5m_old')
|
||||
self._5y: _100btcPattern = _100btcPattern(client, 'utxos_over_5y_old')
|
||||
self._6m: _100btcPattern = _100btcPattern(client, 'utxos_over_6m_old')
|
||||
self._6y: _100btcPattern = _100btcPattern(client, 'utxos_over_6y_old')
|
||||
self._7y: _100btcPattern = _100btcPattern(client, 'utxos_over_7y_old')
|
||||
self._8y: _100btcPattern = _100btcPattern(client, 'utxos_over_8y_old')
|
||||
|
||||
class MetricsTree_Distribution_UtxoCohorts_Term_Long:
|
||||
"""Metrics tree node."""
|
||||
@@ -3320,22 +3320,22 @@ class MetricsTree_Market_Ath:
|
||||
self.price_drawdown: MetricPattern3[StoredF32] = MetricPattern3(client, 'price_drawdown')
|
||||
self.years_since_price_ath: MetricPattern4[StoredF32] = MetricPattern4(client, 'years_since_price_ath')
|
||||
|
||||
class MetricsTree_Market_Dca_ClassAveragePrice:
|
||||
class MetricsTree_Market_Dca_ClassReturns:
|
||||
"""Metrics tree node."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||
self._2015: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2015_average_price')
|
||||
self._2016: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2016_average_price')
|
||||
self._2017: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2017_average_price')
|
||||
self._2018: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2018_average_price')
|
||||
self._2019: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2019_average_price')
|
||||
self._2020: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2020_average_price')
|
||||
self._2021: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2021_average_price')
|
||||
self._2022: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2022_average_price')
|
||||
self._2023: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2023_average_price')
|
||||
self._2024: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2024_average_price')
|
||||
self._2025: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2025_average_price')
|
||||
self._2026: MetricPattern4[Dollars] = MetricPattern4(client, 'dca_class_2026_average_price')
|
||||
self._2015: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2015_returns')
|
||||
self._2016: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2016_returns')
|
||||
self._2017: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2017_returns')
|
||||
self._2018: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2018_returns')
|
||||
self._2019: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2019_returns')
|
||||
self._2020: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2020_returns')
|
||||
self._2021: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2021_returns')
|
||||
self._2022: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2022_returns')
|
||||
self._2023: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2023_returns')
|
||||
self._2024: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2024_returns')
|
||||
self._2025: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2025_returns')
|
||||
self._2026: MetricPattern4[StoredF32] = MetricPattern4(client, 'dca_class_2026_returns')
|
||||
|
||||
class MetricsTree_Market_Dca_ClassStack:
|
||||
"""Metrics tree node."""
|
||||
@@ -3358,8 +3358,8 @@ class MetricsTree_Market_Dca:
|
||||
"""Metrics tree node."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||
self.class_average_price: MetricsTree_Market_Dca_ClassAveragePrice = MetricsTree_Market_Dca_ClassAveragePrice(client)
|
||||
self.class_returns: ClassAveragePricePattern[StoredF32] = ClassAveragePricePattern(client, 'dca_class')
|
||||
self.class_average_price: ClassAveragePricePattern[Dollars] = ClassAveragePricePattern(client, 'dca_class')
|
||||
self.class_returns: MetricsTree_Market_Dca_ClassReturns = MetricsTree_Market_Dca_ClassReturns(client)
|
||||
self.class_stack: MetricsTree_Market_Dca_ClassStack = MetricsTree_Market_Dca_ClassStack(client)
|
||||
self.period_average_price: PeriodAveragePricePattern[Dollars] = PeriodAveragePricePattern(client, 'dca_average_price')
|
||||
self.period_cagr: PeriodCagrPattern = PeriodCagrPattern(client, 'dca_cagr')
|
||||
@@ -3855,28 +3855,12 @@ class MetricsTree_Transactions_Count:
|
||||
self.is_coinbase: MetricPattern27[StoredBool] = MetricPattern27(client, 'is_coinbase')
|
||||
self.tx_count: DollarsPattern[StoredU64] = DollarsPattern(client, 'tx_count')
|
||||
|
||||
class MetricsTree_Transactions_Fees_Fee_Dollars:
|
||||
"""Metrics tree node."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||
self.average: MetricPattern1[Dollars] = MetricPattern1(client, 'fee_usd_average')
|
||||
self.cumulative: MetricPattern2[Dollars] = MetricPattern2(client, 'fee_usd_cumulative')
|
||||
self.height_cumulative: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_cumulative')
|
||||
self.max: MetricPattern1[Dollars] = MetricPattern1(client, 'fee_usd_max')
|
||||
self.median: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_median')
|
||||
self.min: MetricPattern1[Dollars] = MetricPattern1(client, 'fee_usd_min')
|
||||
self.pct10: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_pct10')
|
||||
self.pct25: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_pct25')
|
||||
self.pct75: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_pct75')
|
||||
self.pct90: MetricPattern11[Dollars] = MetricPattern11(client, 'fee_usd_pct90')
|
||||
self.sum: MetricPattern1[Dollars] = MetricPattern1(client, 'fee_usd_sum')
|
||||
|
||||
class MetricsTree_Transactions_Fees_Fee:
|
||||
"""Metrics tree node."""
|
||||
|
||||
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
||||
self.bitcoin: CountPattern2[Bitcoin] = CountPattern2(client, 'fee_btc')
|
||||
self.dollars: MetricsTree_Transactions_Fees_Fee_Dollars = MetricsTree_Transactions_Fees_Fee_Dollars(client)
|
||||
self.dollars: CountPattern2[Dollars] = CountPattern2(client, 'fee_usd')
|
||||
self.sats: CountPattern2[Sats] = CountPattern2(client, 'fee')
|
||||
self.txindex: MetricPattern27[Sats] = MetricPattern27(client, 'fee')
|
||||
|
||||
@@ -4346,107 +4330,107 @@ class BrkClient(BrkClientBase):
|
||||
|
||||
AGE_RANGE_NAMES = {
|
||||
"up_to_1h": {
|
||||
"id": "up_to_1h_old",
|
||||
"id": "under_1h_old",
|
||||
"short": "<1h",
|
||||
"long": "Up to 1 Hour Old"
|
||||
"long": "Under 1 Hour Old"
|
||||
},
|
||||
"_1h_to_1d": {
|
||||
"id": "at_least_1h_up_to_1d_old",
|
||||
"id": "1h_to_1d_old",
|
||||
"short": "1h-1d",
|
||||
"long": "1 Hour to 1 Day Old"
|
||||
},
|
||||
"_1d_to_1w": {
|
||||
"id": "at_least_1d_up_to_1w_old",
|
||||
"id": "1d_to_1w_old",
|
||||
"short": "1d-1w",
|
||||
"long": "1 Day to 1 Week Old"
|
||||
},
|
||||
"_1w_to_1m": {
|
||||
"id": "at_least_1w_up_to_1m_old",
|
||||
"id": "1w_to_1m_old",
|
||||
"short": "1w-1m",
|
||||
"long": "1 Week to 1 Month Old"
|
||||
},
|
||||
"_1m_to_2m": {
|
||||
"id": "at_least_1m_up_to_2m_old",
|
||||
"id": "1m_to_2m_old",
|
||||
"short": "1m-2m",
|
||||
"long": "1 to 2 Months Old"
|
||||
},
|
||||
"_2m_to_3m": {
|
||||
"id": "at_least_2m_up_to_3m_old",
|
||||
"id": "2m_to_3m_old",
|
||||
"short": "2m-3m",
|
||||
"long": "2 to 3 Months Old"
|
||||
},
|
||||
"_3m_to_4m": {
|
||||
"id": "at_least_3m_up_to_4m_old",
|
||||
"id": "3m_to_4m_old",
|
||||
"short": "3m-4m",
|
||||
"long": "3 to 4 Months Old"
|
||||
},
|
||||
"_4m_to_5m": {
|
||||
"id": "at_least_4m_up_to_5m_old",
|
||||
"id": "4m_to_5m_old",
|
||||
"short": "4m-5m",
|
||||
"long": "4 to 5 Months Old"
|
||||
},
|
||||
"_5m_to_6m": {
|
||||
"id": "at_least_5m_up_to_6m_old",
|
||||
"id": "5m_to_6m_old",
|
||||
"short": "5m-6m",
|
||||
"long": "5 to 6 Months Old"
|
||||
},
|
||||
"_6m_to_1y": {
|
||||
"id": "at_least_6m_up_to_1y_old",
|
||||
"id": "6m_to_1y_old",
|
||||
"short": "6m-1y",
|
||||
"long": "6 Months to 1 Year Old"
|
||||
},
|
||||
"_1y_to_2y": {
|
||||
"id": "at_least_1y_up_to_2y_old",
|
||||
"id": "1y_to_2y_old",
|
||||
"short": "1y-2y",
|
||||
"long": "1 to 2 Years Old"
|
||||
},
|
||||
"_2y_to_3y": {
|
||||
"id": "at_least_2y_up_to_3y_old",
|
||||
"id": "2y_to_3y_old",
|
||||
"short": "2y-3y",
|
||||
"long": "2 to 3 Years Old"
|
||||
},
|
||||
"_3y_to_4y": {
|
||||
"id": "at_least_3y_up_to_4y_old",
|
||||
"id": "3y_to_4y_old",
|
||||
"short": "3y-4y",
|
||||
"long": "3 to 4 Years Old"
|
||||
},
|
||||
"_4y_to_5y": {
|
||||
"id": "at_least_4y_up_to_5y_old",
|
||||
"id": "4y_to_5y_old",
|
||||
"short": "4y-5y",
|
||||
"long": "4 to 5 Years Old"
|
||||
},
|
||||
"_5y_to_6y": {
|
||||
"id": "at_least_5y_up_to_6y_old",
|
||||
"id": "5y_to_6y_old",
|
||||
"short": "5y-6y",
|
||||
"long": "5 to 6 Years Old"
|
||||
},
|
||||
"_6y_to_7y": {
|
||||
"id": "at_least_6y_up_to_7y_old",
|
||||
"id": "6y_to_7y_old",
|
||||
"short": "6y-7y",
|
||||
"long": "6 to 7 Years Old"
|
||||
},
|
||||
"_7y_to_8y": {
|
||||
"id": "at_least_7y_up_to_8y_old",
|
||||
"id": "7y_to_8y_old",
|
||||
"short": "7y-8y",
|
||||
"long": "7 to 8 Years Old"
|
||||
},
|
||||
"_8y_to_10y": {
|
||||
"id": "at_least_8y_up_to_10y_old",
|
||||
"id": "8y_to_10y_old",
|
||||
"short": "8y-10y",
|
||||
"long": "8 to 10 Years Old"
|
||||
},
|
||||
"_10y_to_12y": {
|
||||
"id": "at_least_10y_up_to_12y_old",
|
||||
"id": "10y_to_12y_old",
|
||||
"short": "10y-12y",
|
||||
"long": "10 to 12 Years Old"
|
||||
},
|
||||
"_12y_to_15y": {
|
||||
"id": "at_least_12y_up_to_15y_old",
|
||||
"id": "12y_to_15y_old",
|
||||
"short": "12y-15y",
|
||||
"long": "12 to 15 Years Old"
|
||||
},
|
||||
"from_15y": {
|
||||
"id": "at_least_15y_old",
|
||||
"id": "over_15y_old",
|
||||
"short": "15y+",
|
||||
"long": "15+ Years Old"
|
||||
}
|
||||
@@ -4454,187 +4438,187 @@ class BrkClient(BrkClientBase):
|
||||
|
||||
MAX_AGE_NAMES = {
|
||||
"_1w": {
|
||||
"id": "up_to_1w_old",
|
||||
"id": "under_1w_old",
|
||||
"short": "<1w",
|
||||
"long": "Up to 1 Week Old"
|
||||
"long": "Under 1 Week Old"
|
||||
},
|
||||
"_1m": {
|
||||
"id": "up_to_1m_old",
|
||||
"id": "under_1m_old",
|
||||
"short": "<1m",
|
||||
"long": "Up to 1 Month Old"
|
||||
"long": "Under 1 Month Old"
|
||||
},
|
||||
"_2m": {
|
||||
"id": "up_to_2m_old",
|
||||
"id": "under_2m_old",
|
||||
"short": "<2m",
|
||||
"long": "Up to 2 Months Old"
|
||||
"long": "Under 2 Months Old"
|
||||
},
|
||||
"_3m": {
|
||||
"id": "up_to_3m_old",
|
||||
"id": "under_3m_old",
|
||||
"short": "<3m",
|
||||
"long": "Up to 3 Months Old"
|
||||
"long": "Under 3 Months Old"
|
||||
},
|
||||
"_4m": {
|
||||
"id": "up_to_4m_old",
|
||||
"id": "under_4m_old",
|
||||
"short": "<4m",
|
||||
"long": "Up to 4 Months Old"
|
||||
"long": "Under 4 Months Old"
|
||||
},
|
||||
"_5m": {
|
||||
"id": "up_to_5m_old",
|
||||
"id": "under_5m_old",
|
||||
"short": "<5m",
|
||||
"long": "Up to 5 Months Old"
|
||||
"long": "Under 5 Months Old"
|
||||
},
|
||||
"_6m": {
|
||||
"id": "up_to_6m_old",
|
||||
"id": "under_6m_old",
|
||||
"short": "<6m",
|
||||
"long": "Up to 6 Months Old"
|
||||
"long": "Under 6 Months Old"
|
||||
},
|
||||
"_1y": {
|
||||
"id": "up_to_1y_old",
|
||||
"id": "under_1y_old",
|
||||
"short": "<1y",
|
||||
"long": "Up to 1 Year Old"
|
||||
"long": "Under 1 Year Old"
|
||||
},
|
||||
"_2y": {
|
||||
"id": "up_to_2y_old",
|
||||
"id": "under_2y_old",
|
||||
"short": "<2y",
|
||||
"long": "Up to 2 Years Old"
|
||||
"long": "Under 2 Years Old"
|
||||
},
|
||||
"_3y": {
|
||||
"id": "up_to_3y_old",
|
||||
"id": "under_3y_old",
|
||||
"short": "<3y",
|
||||
"long": "Up to 3 Years Old"
|
||||
"long": "Under 3 Years Old"
|
||||
},
|
||||
"_4y": {
|
||||
"id": "up_to_4y_old",
|
||||
"id": "under_4y_old",
|
||||
"short": "<4y",
|
||||
"long": "Up to 4 Years Old"
|
||||
"long": "Under 4 Years Old"
|
||||
},
|
||||
"_5y": {
|
||||
"id": "up_to_5y_old",
|
||||
"id": "under_5y_old",
|
||||
"short": "<5y",
|
||||
"long": "Up to 5 Years Old"
|
||||
"long": "Under 5 Years Old"
|
||||
},
|
||||
"_6y": {
|
||||
"id": "up_to_6y_old",
|
||||
"id": "under_6y_old",
|
||||
"short": "<6y",
|
||||
"long": "Up to 6 Years Old"
|
||||
"long": "Under 6 Years Old"
|
||||
},
|
||||
"_7y": {
|
||||
"id": "up_to_7y_old",
|
||||
"id": "under_7y_old",
|
||||
"short": "<7y",
|
||||
"long": "Up to 7 Years Old"
|
||||
"long": "Under 7 Years Old"
|
||||
},
|
||||
"_8y": {
|
||||
"id": "up_to_8y_old",
|
||||
"id": "under_8y_old",
|
||||
"short": "<8y",
|
||||
"long": "Up to 8 Years Old"
|
||||
"long": "Under 8 Years Old"
|
||||
},
|
||||
"_10y": {
|
||||
"id": "up_to_10y_old",
|
||||
"id": "under_10y_old",
|
||||
"short": "<10y",
|
||||
"long": "Up to 10 Years Old"
|
||||
"long": "Under 10 Years Old"
|
||||
},
|
||||
"_12y": {
|
||||
"id": "up_to_12y_old",
|
||||
"id": "under_12y_old",
|
||||
"short": "<12y",
|
||||
"long": "Up to 12 Years Old"
|
||||
"long": "Under 12 Years Old"
|
||||
},
|
||||
"_15y": {
|
||||
"id": "up_to_15y_old",
|
||||
"id": "under_15y_old",
|
||||
"short": "<15y",
|
||||
"long": "Up to 15 Years Old"
|
||||
"long": "Under 15 Years Old"
|
||||
}
|
||||
}
|
||||
|
||||
MIN_AGE_NAMES = {
|
||||
"_1d": {
|
||||
"id": "at_least_1d_old",
|
||||
"id": "over_1d_old",
|
||||
"short": "1d+",
|
||||
"long": "At Least 1 Day Old"
|
||||
"long": "Over 1 Day Old"
|
||||
},
|
||||
"_1w": {
|
||||
"id": "at_least_1w_old",
|
||||
"id": "over_1w_old",
|
||||
"short": "1w+",
|
||||
"long": "At Least 1 Week Old"
|
||||
"long": "Over 1 Week Old"
|
||||
},
|
||||
"_1m": {
|
||||
"id": "at_least_1m_old",
|
||||
"id": "over_1m_old",
|
||||
"short": "1m+",
|
||||
"long": "At Least 1 Month Old"
|
||||
"long": "Over 1 Month Old"
|
||||
},
|
||||
"_2m": {
|
||||
"id": "at_least_2m_old",
|
||||
"id": "over_2m_old",
|
||||
"short": "2m+",
|
||||
"long": "At Least 2 Months Old"
|
||||
"long": "Over 2 Months Old"
|
||||
},
|
||||
"_3m": {
|
||||
"id": "at_least_3m_old",
|
||||
"id": "over_3m_old",
|
||||
"short": "3m+",
|
||||
"long": "At Least 3 Months Old"
|
||||
"long": "Over 3 Months Old"
|
||||
},
|
||||
"_4m": {
|
||||
"id": "at_least_4m_old",
|
||||
"id": "over_4m_old",
|
||||
"short": "4m+",
|
||||
"long": "At Least 4 Months Old"
|
||||
"long": "Over 4 Months Old"
|
||||
},
|
||||
"_5m": {
|
||||
"id": "at_least_5m_old",
|
||||
"id": "over_5m_old",
|
||||
"short": "5m+",
|
||||
"long": "At Least 5 Months Old"
|
||||
"long": "Over 5 Months Old"
|
||||
},
|
||||
"_6m": {
|
||||
"id": "at_least_6m_old",
|
||||
"id": "over_6m_old",
|
||||
"short": "6m+",
|
||||
"long": "At Least 6 Months Old"
|
||||
"long": "Over 6 Months Old"
|
||||
},
|
||||
"_1y": {
|
||||
"id": "at_least_1y_old",
|
||||
"id": "over_1y_old",
|
||||
"short": "1y+",
|
||||
"long": "At Least 1 Year Old"
|
||||
"long": "Over 1 Year Old"
|
||||
},
|
||||
"_2y": {
|
||||
"id": "at_least_2y_old",
|
||||
"id": "over_2y_old",
|
||||
"short": "2y+",
|
||||
"long": "At Least 2 Years Old"
|
||||
"long": "Over 2 Years Old"
|
||||
},
|
||||
"_3y": {
|
||||
"id": "at_least_3y_old",
|
||||
"id": "over_3y_old",
|
||||
"short": "3y+",
|
||||
"long": "At Least 3 Years Old"
|
||||
"long": "Over 3 Years Old"
|
||||
},
|
||||
"_4y": {
|
||||
"id": "at_least_4y_old",
|
||||
"id": "over_4y_old",
|
||||
"short": "4y+",
|
||||
"long": "At Least 4 Years Old"
|
||||
"long": "Over 4 Years Old"
|
||||
},
|
||||
"_5y": {
|
||||
"id": "at_least_5y_old",
|
||||
"id": "over_5y_old",
|
||||
"short": "5y+",
|
||||
"long": "At Least 5 Years Old"
|
||||
"long": "Over 5 Years Old"
|
||||
},
|
||||
"_6y": {
|
||||
"id": "at_least_6y_old",
|
||||
"id": "over_6y_old",
|
||||
"short": "6y+",
|
||||
"long": "At Least 6 Years Old"
|
||||
"long": "Over 6 Years Old"
|
||||
},
|
||||
"_7y": {
|
||||
"id": "at_least_7y_old",
|
||||
"id": "over_7y_old",
|
||||
"short": "7y+",
|
||||
"long": "At Least 7 Years Old"
|
||||
"long": "Over 7 Years Old"
|
||||
},
|
||||
"_8y": {
|
||||
"id": "at_least_8y_old",
|
||||
"id": "over_8y_old",
|
||||
"short": "8y+",
|
||||
"long": "At Least 8 Years Old"
|
||||
"long": "Over 8 Years Old"
|
||||
},
|
||||
"_10y": {
|
||||
"id": "at_least_10y_old",
|
||||
"id": "over_10y_old",
|
||||
"short": "10y+",
|
||||
"long": "At Least 10 Years Old"
|
||||
"long": "Over 10 Years Old"
|
||||
},
|
||||
"_12y": {
|
||||
"id": "at_least_12y_old",
|
||||
"id": "over_12y_old",
|
||||
"short": "12y+",
|
||||
"long": "At Least 12 Years Old"
|
||||
"long": "Over 12 Years Old"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4718,69 +4702,69 @@ class BrkClient(BrkClientBase):
|
||||
|
||||
GE_AMOUNT_NAMES = {
|
||||
"_1sat": {
|
||||
"id": "above_1sat",
|
||||
"id": "over_1sat",
|
||||
"short": "1+ sats",
|
||||
"long": "Above 1 Sat"
|
||||
"long": "Over 1 Sat"
|
||||
},
|
||||
"_10sats": {
|
||||
"id": "above_10sats",
|
||||
"id": "over_10sats",
|
||||
"short": "10+ sats",
|
||||
"long": "Above 10 Sats"
|
||||
"long": "Over 10 Sats"
|
||||
},
|
||||
"_100sats": {
|
||||
"id": "above_100sats",
|
||||
"id": "over_100sats",
|
||||
"short": "100+ sats",
|
||||
"long": "Above 100 Sats"
|
||||
"long": "Over 100 Sats"
|
||||
},
|
||||
"_1k_sats": {
|
||||
"id": "above_1k_sats",
|
||||
"id": "over_1k_sats",
|
||||
"short": "1k+ sats",
|
||||
"long": "Above 1K Sats"
|
||||
"long": "Over 1K Sats"
|
||||
},
|
||||
"_10k_sats": {
|
||||
"id": "above_10k_sats",
|
||||
"id": "over_10k_sats",
|
||||
"short": "10k+ sats",
|
||||
"long": "Above 10K Sats"
|
||||
"long": "Over 10K Sats"
|
||||
},
|
||||
"_100k_sats": {
|
||||
"id": "above_100k_sats",
|
||||
"id": "over_100k_sats",
|
||||
"short": "100k+ sats",
|
||||
"long": "Above 100K Sats"
|
||||
"long": "Over 100K Sats"
|
||||
},
|
||||
"_1m_sats": {
|
||||
"id": "above_1m_sats",
|
||||
"id": "over_1m_sats",
|
||||
"short": "1M+ sats",
|
||||
"long": "Above 1M Sats"
|
||||
"long": "Over 1M Sats"
|
||||
},
|
||||
"_10m_sats": {
|
||||
"id": "above_10m_sats",
|
||||
"id": "over_10m_sats",
|
||||
"short": "0.1+ BTC",
|
||||
"long": "Above 0.1 BTC"
|
||||
"long": "Over 0.1 BTC"
|
||||
},
|
||||
"_1btc": {
|
||||
"id": "above_1btc",
|
||||
"id": "over_1btc",
|
||||
"short": "1+ BTC",
|
||||
"long": "Above 1 BTC"
|
||||
"long": "Over 1 BTC"
|
||||
},
|
||||
"_10btc": {
|
||||
"id": "above_10btc",
|
||||
"id": "over_10btc",
|
||||
"short": "10+ BTC",
|
||||
"long": "Above 10 BTC"
|
||||
"long": "Over 10 BTC"
|
||||
},
|
||||
"_100btc": {
|
||||
"id": "above_100btc",
|
||||
"id": "over_100btc",
|
||||
"short": "100+ BTC",
|
||||
"long": "Above 100 BTC"
|
||||
"long": "Over 100 BTC"
|
||||
},
|
||||
"_1k_btc": {
|
||||
"id": "above_1k_btc",
|
||||
"id": "over_1k_btc",
|
||||
"short": "1k+ BTC",
|
||||
"long": "Above 1K BTC"
|
||||
"long": "Over 1K BTC"
|
||||
},
|
||||
"_10k_btc": {
|
||||
"id": "above_10k_btc",
|
||||
"id": "over_10k_btc",
|
||||
"short": "10k+ BTC",
|
||||
"long": "Above 10K BTC"
|
||||
"long": "Over 10K BTC"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,28 +103,28 @@ export function createChainSection(ctx) {
|
||||
}),
|
||||
line({
|
||||
metric: pool._24hBlocksMined,
|
||||
name: "24h Sum",
|
||||
name: "24h sum",
|
||||
color: colors.pink,
|
||||
unit: Unit.count,
|
||||
defaultActive: false,
|
||||
}),
|
||||
line({
|
||||
metric: pool._1wBlocksMined,
|
||||
name: "1w Sum",
|
||||
name: "1w sum",
|
||||
color: colors.red,
|
||||
unit: Unit.count,
|
||||
defaultActive: false,
|
||||
}),
|
||||
line({
|
||||
metric: pool._1mBlocksMined,
|
||||
name: "1m Sum",
|
||||
name: "1m sum",
|
||||
color: colors.pink,
|
||||
unit: Unit.count,
|
||||
defaultActive: false,
|
||||
}),
|
||||
line({
|
||||
metric: pool._1yBlocksMined,
|
||||
name: "1y Sum",
|
||||
name: "1y sum",
|
||||
color: colors.purple,
|
||||
unit: Unit.count,
|
||||
defaultActive: false,
|
||||
@@ -568,42 +568,9 @@ export function createChainSection(ctx) {
|
||||
name: "Fee",
|
||||
title: "Transaction Fees",
|
||||
bottom: [
|
||||
line({
|
||||
metric: transactions.fees.fee.bitcoin.sum,
|
||||
name: "sum",
|
||||
unit: Unit.btc,
|
||||
}),
|
||||
line({
|
||||
metric: transactions.fees.fee.bitcoin.cumulative,
|
||||
name: "cumulative",
|
||||
color: colors.stat.cumulative,
|
||||
unit: Unit.btc,
|
||||
defaultActive: false,
|
||||
}),
|
||||
line({
|
||||
metric: transactions.fees.fee.sats.sum,
|
||||
name: "sum",
|
||||
unit: Unit.sats,
|
||||
}),
|
||||
line({
|
||||
metric: transactions.fees.fee.sats.cumulative,
|
||||
name: "cumulative",
|
||||
color: colors.stat.cumulative,
|
||||
unit: Unit.sats,
|
||||
defaultActive: false,
|
||||
}),
|
||||
line({
|
||||
metric: transactions.fees.fee.dollars.sum,
|
||||
name: "sum",
|
||||
unit: Unit.usd,
|
||||
}),
|
||||
line({
|
||||
metric: transactions.fees.fee.dollars.cumulative,
|
||||
name: "cumulative",
|
||||
color: colors.stat.cumulative,
|
||||
unit: Unit.usd,
|
||||
defaultActive: false,
|
||||
}),
|
||||
...fromSizePattern(transactions.fees.fee.bitcoin, Unit.btc),
|
||||
...fromSizePattern(transactions.fees.fee.sats, Unit.sats),
|
||||
...fromSizePattern(transactions.fees.fee.dollars, Unit.usd),
|
||||
line({
|
||||
metric: blocks.rewards.feeDominance,
|
||||
name: "Dominance",
|
||||
|
||||
@@ -19,6 +19,17 @@ import { colors } from "../chart/colors.js";
|
||||
|
||||
/** @typedef {ReturnType<typeof createContext>} PartialContext */
|
||||
|
||||
/**
|
||||
* @template {(colors: Colors, ...args: any[]) => any} T
|
||||
* @param {T} fn
|
||||
* @returns {OmitFirstArg<T>}
|
||||
*/
|
||||
const bind = (fn) =>
|
||||
/** @type {any} */ (
|
||||
// @ts-ignore
|
||||
(...args) => fn(colors, ...args)
|
||||
);
|
||||
|
||||
/**
|
||||
* Create a context object with all dependencies for building partial options
|
||||
* @param {Object} args
|
||||
@@ -28,43 +39,15 @@ export function createContext({ brk }) {
|
||||
return {
|
||||
colors,
|
||||
brk,
|
||||
|
||||
/** @type {OmitFirstArg<typeof fromSizePattern>} */
|
||||
fromSizePattern: (pattern, unit, title) =>
|
||||
fromSizePattern(colors, pattern, unit, title),
|
||||
/** @type {OmitFirstArg<typeof fromFullnessPattern>} */
|
||||
fromFullnessPattern: (pattern, unit, title) =>
|
||||
fromFullnessPattern(colors, pattern, unit, title),
|
||||
/** @type {OmitFirstArg<typeof fromDollarsPattern>} */
|
||||
fromDollarsPattern: (pattern, unit, title) =>
|
||||
fromDollarsPattern(colors, pattern, unit, title),
|
||||
/** @type {OmitFirstArg<typeof fromFeeRatePattern>} */
|
||||
fromFeeRatePattern: (pattern, unit, title) =>
|
||||
fromFeeRatePattern(colors, pattern, unit, title),
|
||||
/** @type {OmitFirstArg<typeof fromCoinbasePattern>} */
|
||||
fromCoinbasePattern: (pattern, title) =>
|
||||
fromCoinbasePattern(colors, pattern, title),
|
||||
/** @type {OmitFirstArg<typeof fromValuePattern>} */
|
||||
fromValuePattern: (pattern, title, sumColor, cumulativeColor) =>
|
||||
fromValuePattern(colors, pattern, title, sumColor, cumulativeColor),
|
||||
/** @type {OmitFirstArg<typeof fromBitcoinPatternWithUnit>} */
|
||||
fromBitcoinPatternWithUnit: (pattern, unit, title, sumColor, cumulativeColor) =>
|
||||
fromBitcoinPatternWithUnit(colors, pattern, unit, title, sumColor, cumulativeColor),
|
||||
/** @type {OmitFirstArg<typeof fromBlockCountWithUnit>} */
|
||||
fromBlockCountWithUnit: (pattern, unit, title, sumColor, cumulativeColor) =>
|
||||
fromBlockCountWithUnit(
|
||||
colors,
|
||||
pattern,
|
||||
unit,
|
||||
title,
|
||||
sumColor,
|
||||
cumulativeColor,
|
||||
),
|
||||
/** @type {OmitFirstArg<typeof fromIntervalPattern>} */
|
||||
fromIntervalPattern: (pattern, unit, title, color) =>
|
||||
fromIntervalPattern(colors, pattern, unit, title, color),
|
||||
/** @type {fromSupplyPattern} */
|
||||
fromSupplyPattern: (pattern, title, color) =>
|
||||
fromSupplyPattern(pattern, title, color),
|
||||
fromSizePattern: bind(fromSizePattern),
|
||||
fromFullnessPattern: bind(fromFullnessPattern),
|
||||
fromDollarsPattern: bind(fromDollarsPattern),
|
||||
fromFeeRatePattern: bind(fromFeeRatePattern),
|
||||
fromCoinbasePattern: bind(fromCoinbasePattern),
|
||||
fromValuePattern: bind(fromValuePattern),
|
||||
fromBitcoinPatternWithUnit: bind(fromBitcoinPatternWithUnit),
|
||||
fromBlockCountWithUnit: bind(fromBlockCountWithUnit),
|
||||
fromIntervalPattern: bind(fromIntervalPattern),
|
||||
fromSupplyPattern,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ export function createAddressCohortFolder(ctx, args) {
|
||||
{
|
||||
name: "Ratio",
|
||||
title: title("Realized Price Ratio"),
|
||||
bottom: createRealizedPriceRatioSeries(ctx, list),
|
||||
bottom: createRealizedPriceRatioSeries(list),
|
||||
},
|
||||
]
|
||||
: createRealizedPriceOptions(
|
||||
|
||||
@@ -295,11 +295,10 @@ export function createRealizedPriceSeries(list) {
|
||||
|
||||
/**
|
||||
* Create realized price ratio series for grouped cohorts
|
||||
* @param {PartialContext} ctx
|
||||
* @param {readonly CohortObject[]} list
|
||||
* @returns {AnyFetchedSeriesBlueprint[]}
|
||||
*/
|
||||
export function createRealizedPriceRatioSeries(ctx, list) {
|
||||
export function createRealizedPriceRatioSeries(list) {
|
||||
return list.map(({ name, tree }) =>
|
||||
baseline({
|
||||
metric: tree.realized.realizedPriceExtra.ratio,
|
||||
|
||||
@@ -199,7 +199,7 @@ export function createCohortFolderAgeRange(ctx, args) {
|
||||
createGroupedRealizedSectionBasic(ctx, list, title, {
|
||||
ratioMetrics: createGroupedRealizedPnlRatioMetrics,
|
||||
}),
|
||||
createGroupedUnrealizedSectionAgeRange(ctx, list, title),
|
||||
createGroupedUnrealizedSectionAgeRange(list, title),
|
||||
createGroupedCostBasisSectionWithPercentiles(ctx, list, title),
|
||||
createGroupedActivitySection({ list, title }),
|
||||
],
|
||||
@@ -271,7 +271,7 @@ export function createCohortFolderBasicWithoutMarketCap(ctx, args) {
|
||||
createGroupedSupplySection(list, title),
|
||||
createGroupedUtxoCountChart(list, title),
|
||||
createGroupedRealizedSectionBasic(ctx, list, title),
|
||||
createGroupedUnrealizedSectionBase(ctx, list, title),
|
||||
createGroupedUnrealizedSectionBase(list, title),
|
||||
createGroupedCostBasisSection({ list, title }),
|
||||
createGroupedActivitySection({ list, title }),
|
||||
],
|
||||
@@ -307,9 +307,9 @@ export function createCohortFolderAddress(ctx, args) {
|
||||
tree: [
|
||||
createGroupedSupplySection(list, title),
|
||||
createGroupedUtxoCountChart(list, title),
|
||||
createGroupedAddrCountChart(ctx, list, title),
|
||||
createGroupedAddrCountChart(list, title),
|
||||
createGroupedRealizedSectionBasic(ctx, list, title),
|
||||
createGroupedUnrealizedSectionBase(ctx, list, title),
|
||||
createGroupedUnrealizedSectionBase(list, title),
|
||||
createGroupedCostBasisSection({ list, title }),
|
||||
createGroupedActivitySection({ list, title }),
|
||||
],
|
||||
@@ -400,12 +400,11 @@ function createSingleAddrCountChart(ctx, cohort, title) {
|
||||
|
||||
/**
|
||||
* Create address count chart for grouped cohorts with addrCount
|
||||
* @param {PartialContext} _ctx
|
||||
* @param {readonly CohortAddress[]} list
|
||||
* @param {(metric: string) => string} title
|
||||
* @returns {PartialChartOption}
|
||||
*/
|
||||
function createGroupedAddrCountChart(_ctx, list, title) {
|
||||
function createGroupedAddrCountChart(list, title) {
|
||||
return {
|
||||
name: "address count",
|
||||
title: title("Address Count"),
|
||||
@@ -487,7 +486,7 @@ function createGroupedRealizedSectionWithAdjusted(ctx, list, title, { ratioMetri
|
||||
{
|
||||
name: "Ratio",
|
||||
title: title("Realized Price Ratio"),
|
||||
bottom: createRealizedPriceRatioSeries(ctx, list),
|
||||
bottom: createRealizedPriceRatioSeries(list),
|
||||
},
|
||||
{
|
||||
name: "capitalization",
|
||||
@@ -495,7 +494,7 @@ function createGroupedRealizedSectionWithAdjusted(ctx, list, title, { ratioMetri
|
||||
bottom: createGroupedRealizedCapSeries(list),
|
||||
},
|
||||
...createGroupedRealizedPnlSections(ctx, list, title, { ratioMetrics }),
|
||||
createGroupedSoprSectionWithAdjusted(ctx, list, title),
|
||||
createGroupedSoprSectionWithAdjusted(list, title),
|
||||
],
|
||||
};
|
||||
}
|
||||
@@ -572,7 +571,7 @@ function createGroupedRealizedSectionBasic(ctx, list, title, { ratioMetrics } =
|
||||
{
|
||||
name: "Ratio",
|
||||
title: title("Realized Price Ratio"),
|
||||
bottom: createRealizedPriceRatioSeries(ctx, list),
|
||||
bottom: createRealizedPriceRatioSeries(list),
|
||||
},
|
||||
{
|
||||
name: "capitalization",
|
||||
@@ -580,7 +579,7 @@ function createGroupedRealizedSectionBasic(ctx, list, title, { ratioMetrics } =
|
||||
bottom: createGroupedRealizedCapSeries(list),
|
||||
},
|
||||
...createGroupedRealizedPnlSections(ctx, list, title, { ratioMetrics }),
|
||||
createGroupedSoprSectionBasic(ctx, list, title),
|
||||
createGroupedSoprSectionBasic(list, title),
|
||||
],
|
||||
};
|
||||
}
|
||||
@@ -1148,19 +1147,17 @@ function createSingleAdjustedSoprChart(ctx, cohort, title) {
|
||||
defaultActive: false,
|
||||
options: { baseValue: { price: 1 } },
|
||||
}),
|
||||
priceLine({ ctx, number: 1, unit: Unit.ratio }),
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create grouped base SOPR chart (all UTXO cohorts have base SOPR)
|
||||
* @param {PartialContext} ctx
|
||||
* @param {readonly (CohortAll | CohortFull | CohortWithAdjusted | CohortLongTerm | CohortAgeRange | CohortBasicWithMarketCap | CohortBasicWithoutMarketCap | CohortAddress)[]} list
|
||||
* @param {(metric: string) => string} title
|
||||
* @returns {PartialChartOption}
|
||||
*/
|
||||
function createGroupedBaseSoprChart(ctx, list, title) {
|
||||
function createGroupedBaseSoprChart(list, title) {
|
||||
return {
|
||||
name: "Normal",
|
||||
title: title("SOPR"),
|
||||
@@ -1190,19 +1187,17 @@ function createGroupedBaseSoprChart(ctx, list, title) {
|
||||
base: 1,
|
||||
}),
|
||||
]),
|
||||
priceLine({ ctx, number: 1, unit: Unit.ratio }),
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create grouped adjusted SOPR chart (cohorts with RealizedPattern3/4)
|
||||
* @param {PartialContext} ctx
|
||||
* @param {readonly (CohortFull | CohortWithAdjusted)[]} list
|
||||
* @param {(metric: string) => string} title
|
||||
* @returns {PartialChartOption}
|
||||
*/
|
||||
function createGroupedAdjustedSoprChart(ctx, list, title) {
|
||||
function createGroupedAdjustedSoprChart(list, title) {
|
||||
return {
|
||||
name: "Adjusted",
|
||||
title: title("aSOPR"),
|
||||
@@ -1232,7 +1227,6 @@ function createGroupedAdjustedSoprChart(ctx, list, title) {
|
||||
options: { baseValue: { price: 1 } },
|
||||
}),
|
||||
]),
|
||||
priceLine({ ctx, number: 1, unit: Unit.ratio }),
|
||||
],
|
||||
};
|
||||
}
|
||||
@@ -1260,17 +1254,16 @@ function createSingleSoprSectionWithAdjusted(ctx, cohort, title) {
|
||||
|
||||
/**
|
||||
* Create grouped SOPR section with adjusted SOPR
|
||||
* @param {PartialContext} ctx
|
||||
* @param {readonly (CohortFull | CohortWithAdjusted)[]} list
|
||||
* @param {(metric: string) => string} title
|
||||
* @returns {PartialOptionsGroup}
|
||||
*/
|
||||
function createGroupedSoprSectionWithAdjusted(ctx, list, title) {
|
||||
function createGroupedSoprSectionWithAdjusted(list, title) {
|
||||
return {
|
||||
name: "sopr",
|
||||
tree: [
|
||||
createGroupedBaseSoprChart(ctx, list, title),
|
||||
createGroupedAdjustedSoprChart(ctx, list, title),
|
||||
createGroupedBaseSoprChart(list, title),
|
||||
createGroupedAdjustedSoprChart(list, title),
|
||||
],
|
||||
};
|
||||
}
|
||||
@@ -1291,15 +1284,14 @@ function createSingleSoprSectionBasic(ctx, cohort, title) {
|
||||
|
||||
/**
|
||||
* Create grouped SOPR section without adjusted SOPR
|
||||
* @param {PartialContext} ctx
|
||||
* @param {readonly (CohortWithPercentiles | CohortBasic | CohortAddress)[]} list
|
||||
* @param {(metric: string) => string} title
|
||||
* @returns {PartialOptionsGroup}
|
||||
*/
|
||||
function createGroupedSoprSectionBasic(ctx, list, title) {
|
||||
function createGroupedSoprSectionBasic(list, title) {
|
||||
return {
|
||||
name: "sopr",
|
||||
tree: [createGroupedBaseSoprChart(ctx, list, title)],
|
||||
tree: [createGroupedBaseSoprChart(list, title)],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1586,15 +1578,13 @@ function createUnrealizedSection({ ctx, tree, title, pnl = [], netPnl = [], char
|
||||
* Generic grouped unrealized section builder - callers pass typed metric generators
|
||||
* @template {readonly { color: Color, name: string, tree: { unrealized: UnrealizedPattern } }[]} T
|
||||
* @param {Object} args
|
||||
* @param {PartialContext} args.ctx
|
||||
* @param {T} args.list
|
||||
* @param {(metric: string) => string} args.title
|
||||
* @param {(cohort: T[number]) => AnyFetchedSeriesBlueprint[]} [args.netPnlMetrics] - Generator for extra net pnl metrics per cohort
|
||||
* @param {AnyFetchedSeriesBlueprint[]} [args.priceLines] - Extra price lines for net pnl chart
|
||||
* @param {PartialChartOption[]} [args.charts] - Extra charts
|
||||
* @returns {PartialOptionsGroup}
|
||||
*/
|
||||
function createGroupedUnrealizedSection({ ctx, list, title, netPnlMetrics, priceLines = [], charts = [] }) {
|
||||
function createGroupedUnrealizedSection({ list, title, netPnlMetrics, charts = [] }) {
|
||||
return {
|
||||
name: "Unrealized",
|
||||
tree: [
|
||||
@@ -1612,8 +1602,6 @@ function createGroupedUnrealizedSection({ ctx, list, title, netPnlMetrics, price
|
||||
}),
|
||||
...(netPnlMetrics ? netPnlMetrics(cohort) : []),
|
||||
]),
|
||||
priceLine({ ctx, unit: Unit.usd }),
|
||||
...priceLines,
|
||||
],
|
||||
},
|
||||
...charts,
|
||||
@@ -1783,7 +1771,6 @@ function createGroupedUnrealizedBaseCharts(list, title) {
|
||||
*/
|
||||
function createGroupedUnrealizedSectionFull(ctx, list, title) {
|
||||
return createGroupedUnrealizedSection({
|
||||
ctx,
|
||||
list,
|
||||
title,
|
||||
netPnlMetrics: ({ color, name, tree }) => [
|
||||
@@ -1791,11 +1778,6 @@ function createGroupedUnrealizedSectionFull(ctx, list, title) {
|
||||
baseline({ metric: tree.relative.netUnrealizedPnlRelToOwnMarketCap, name, color, unit: Unit.pctOwnMcap }),
|
||||
baseline({ metric: tree.relative.netUnrealizedPnlRelToOwnTotalUnrealizedPnl, name, color, unit: Unit.pctOwnPnl }),
|
||||
],
|
||||
priceLines: [
|
||||
priceLine({ ctx, unit: Unit.pctMcap }),
|
||||
priceLine({ ctx, unit: Unit.pctOwnMcap }),
|
||||
priceLine({ ctx, unit: Unit.pctOwnPnl }),
|
||||
],
|
||||
charts: [createGroupedNuplChart(ctx, list, title)],
|
||||
});
|
||||
}
|
||||
@@ -1808,13 +1790,11 @@ function createGroupedUnrealizedSectionFull(ctx, list, title) {
|
||||
*/
|
||||
function createGroupedUnrealizedSectionWithMarketCap(ctx, list, title) {
|
||||
return createGroupedUnrealizedSection({
|
||||
ctx,
|
||||
list,
|
||||
title,
|
||||
netPnlMetrics: ({ color, name, tree }) => [
|
||||
baseline({ metric: tree.relative.netUnrealizedPnlRelToMarketCap, name, color, unit: Unit.pctMcap }),
|
||||
],
|
||||
priceLines: [priceLine({ ctx, unit: Unit.pctMcap })],
|
||||
charts: [createGroupedNuplChart(ctx, list, title)],
|
||||
});
|
||||
}
|
||||
@@ -1828,25 +1808,22 @@ function createGroupedUnrealizedSectionWithMarketCap(ctx, list, title) {
|
||||
*/
|
||||
function createGroupedUnrealizedSectionWithMarketCapOnly(ctx, list, title) {
|
||||
return createGroupedUnrealizedSection({
|
||||
ctx,
|
||||
list,
|
||||
title,
|
||||
netPnlMetrics: ({ color, name, tree }) => [
|
||||
baseline({ metric: tree.relative.netUnrealizedPnlRelToMarketCap, name, color, unit: Unit.pctMcap }),
|
||||
],
|
||||
priceLines: [priceLine({ ctx, unit: Unit.pctMcap })],
|
||||
charts: [createGroupedNuplChart(ctx, list, title)],
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Grouped unrealized section without RelToMarketCap (for CohortBasicWithoutMarketCap)
|
||||
* @param {PartialContext} ctx
|
||||
* @param {readonly CohortBasicWithoutMarketCap[]} list
|
||||
* @param {(metric: string) => string} title
|
||||
*/
|
||||
function createGroupedUnrealizedSectionBase(ctx, list, title) {
|
||||
return createGroupedUnrealizedSection({ ctx, list, title });
|
||||
function createGroupedUnrealizedSectionBase(list, title) {
|
||||
return createGroupedUnrealizedSection({ list, title });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1863,10 +1840,12 @@ function createSingleUnrealizedSectionWithNupl({ ctx, cohort, title }) {
|
||||
tree,
|
||||
title,
|
||||
pnl: [
|
||||
...createUnrealizedPnlRelToMarketCapMetrics(ctx, tree.relative),
|
||||
...createUnrealizedPnlRelToOwnMarketCapMetrics(ctx, tree.relative),
|
||||
...createUnrealizedPnlRelToOwnPnlMetrics(ctx, tree.relative),
|
||||
],
|
||||
netPnl: [
|
||||
...createNetUnrealizedPnlRelToMarketCapMetrics(tree.relative),
|
||||
...createNetUnrealizedPnlRelToOwnMarketCapMetrics(ctx, tree.relative),
|
||||
...createNetUnrealizedPnlRelToOwnPnlMetrics(ctx, tree.relative),
|
||||
],
|
||||
@@ -1883,14 +1862,13 @@ function createSingleUnrealizedSectionWithNupl({ ctx, cohort, title }) {
|
||||
*/
|
||||
function createGroupedUnrealizedSectionWithNupl({ ctx, list, title }) {
|
||||
return createGroupedUnrealizedSection({
|
||||
ctx,
|
||||
list,
|
||||
title,
|
||||
netPnlMetrics: ({ color, name, tree }) => [
|
||||
baseline({ metric: tree.relative.netUnrealizedPnlRelToMarketCap, name, color, unit: Unit.pctMcap }),
|
||||
baseline({ metric: tree.relative.netUnrealizedPnlRelToOwnMarketCap, name, color, unit: Unit.pctOwnMcap }),
|
||||
baseline({ metric: tree.relative.netUnrealizedPnlRelToOwnTotalUnrealizedPnl, name, color, unit: Unit.pctOwnPnl }),
|
||||
],
|
||||
priceLines: [priceLine({ ctx, unit: Unit.pctOwnMcap }), priceLine({ ctx, unit: Unit.pctOwnPnl })],
|
||||
charts: [createGroupedNuplChart(ctx, list, title)],
|
||||
});
|
||||
}
|
||||
@@ -1920,20 +1898,17 @@ function createSingleUnrealizedSectionAgeRange(ctx, cohort, title) {
|
||||
|
||||
/**
|
||||
* Grouped unrealized section for AgeRange cohorts (no nupl via RelativePattern2)
|
||||
* @param {PartialContext} ctx
|
||||
* @param {readonly CohortAgeRange[]} list
|
||||
* @param {(metric: string) => string} title
|
||||
*/
|
||||
function createGroupedUnrealizedSectionAgeRange(ctx, list, title) {
|
||||
function createGroupedUnrealizedSectionAgeRange(list, title) {
|
||||
return createGroupedUnrealizedSection({
|
||||
ctx,
|
||||
list,
|
||||
title,
|
||||
netPnlMetrics: ({ color, name, tree }) => [
|
||||
baseline({ metric: tree.relative.netUnrealizedPnlRelToOwnMarketCap, name, color, unit: Unit.pctOwnMcap }),
|
||||
baseline({ metric: tree.relative.netUnrealizedPnlRelToOwnTotalUnrealizedPnl, name, color, unit: Unit.pctOwnPnl }),
|
||||
],
|
||||
priceLines: [priceLine({ ctx, unit: Unit.pctOwnMcap }), priceLine({ ctx, unit: Unit.pctOwnPnl })],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/** On-chain indicators (Pi Cycle, Puell, NVT, Gini) */
|
||||
|
||||
import { Unit } from "../../../utils/units.js";
|
||||
import { priceLine } from "../../constants.js";
|
||||
import { baseline, line } from "../../series.js";
|
||||
|
||||
/**
|
||||
|
||||
@@ -198,7 +198,6 @@ export function createRatioChart(ctx, { title, price, ratio, color, name }) {
|
||||
options: { lineStyle: 1 },
|
||||
}),
|
||||
),
|
||||
priceLine({ ctx, unit: Unit.ratio, number: 1 }),
|
||||
],
|
||||
};
|
||||
}
|
||||
@@ -335,7 +334,6 @@ export function createZScoresFolder(
|
||||
defaultActive: false,
|
||||
}),
|
||||
),
|
||||
priceLine({ ctx, unit: Unit.ratio, number: 1 }),
|
||||
priceLine({
|
||||
ctx,
|
||||
unit: Unit.sd,
|
||||
|
||||
Reference in New Issue
Block a user