diff --git a/crates/brk_client/src/lib.rs b/crates/brk_client/src/lib.rs index 1a677491b..eb413dcfc 100644 --- a/crates/brk_client/src/lib.rs +++ b/crates/brk_client/src/lib.rs @@ -1042,7 +1042,7 @@ pub struct CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern { pub mvrv: MetricPattern1, pub net_pnl: ChangeCumulativeDeltaRawRelSumPattern, pub nupl: BpsRatioPattern, - pub peak_regret: CumulativeHeightRelPattern, + pub peak_regret: CumulativeRawRelPattern, pub price: CentsSatsUsdPattern, pub price_ratio: BpsPercentilesRatioStdPattern, pub profit: CumulativeDistributionRawRelSumValuePattern, @@ -1062,7 +1062,7 @@ impl CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern { mvrv: MetricPattern1::new(client.clone(), _m(&acc, "mvrv")), net_pnl: ChangeCumulativeDeltaRawRelSumPattern::new(client.clone(), _m(&acc, "net")), nupl: BpsRatioPattern::new(client.clone(), _m(&acc, "nupl_ratio")), - peak_regret: CumulativeHeightRelPattern::new(client.clone(), _m(&acc, "realized_peak_regret")), + peak_regret: CumulativeRawRelPattern::new(client.clone(), _m(&acc, "realized_peak_regret")), price: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "realized_price")), price_ratio: BpsPercentilesRatioStdPattern::new(client.clone(), _m(&acc, "realized_price_ratio")), profit: CumulativeDistributionRawRelSumValuePattern::new(client.clone(), acc.clone()), @@ -1180,10 +1180,9 @@ impl AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern { } /// Pattern struct for repeated tree structure. -pub struct AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern { +pub struct AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern { pub average: _1m1w1y24hPattern, pub cumulative: MetricPattern1, - pub height: MetricPattern18, pub max: _1m1w1y24hPattern, pub median: _1m1w1y24hPattern, pub min: _1m1w1y24hPattern, @@ -1191,16 +1190,16 @@ pub struct AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern { pub pct25: _1m1w1y24hPattern, pub pct75: _1m1w1y24hPattern, pub pct90: _1m1w1y24hPattern, + pub raw: MetricPattern1, pub sum: _1m1w1y24hPattern, } -impl AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern { +impl AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { average: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "average")), cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - height: MetricPattern18::new(client.clone(), acc.clone()), max: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "max")), median: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "median")), min: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "min")), @@ -1208,6 +1207,7 @@ impl AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern { pct25: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "pct25")), pct75: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "pct75")), pct90: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "pct90")), + raw: MetricPattern1::new(client.clone(), acc.clone()), sum: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "sum")), } } @@ -1286,7 +1286,7 @@ pub struct CapLossMvrvNetNuplPriceProfitSentSoprPattern { pub nupl: BpsRatioPattern, pub price: CentsSatsUsdPattern, pub price_ratio: BpsRatioPattern, - pub profit: CumulativeRawSumPattern, + pub profit: CumulativeRawSumPattern2, pub sent: InPattern, pub sopr: RatioValuePattern, } @@ -1302,7 +1302,7 @@ impl CapLossMvrvNetNuplPriceProfitSentSoprPattern { nupl: BpsRatioPattern::new(client.clone(), _m(&acc, "nupl_ratio")), price: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "realized_price")), price_ratio: BpsRatioPattern::new(client.clone(), _m(&acc, "realized_price_ratio")), - profit: CumulativeRawSumPattern::new(client.clone(), _m(&acc, "realized_profit")), + profit: CumulativeRawSumPattern2::new(client.clone(), _m(&acc, "realized_profit")), sent: InPattern::new(client.clone(), _m(&acc, "sent_in")), sopr: RatioValuePattern::new(client.clone(), acc.clone()), } @@ -1618,75 +1618,77 @@ impl CumulativeDistributionRawRelSumValuePattern { } /// Pattern struct for repeated tree structure. -pub struct GrossInvestedInvestorLossNetProfitSentimentPattern { +pub struct GrossInvestedInvestorLossNetProfitSentimentPattern2 { pub gross_pnl: CentsUsdPattern, - pub invested_capital: InPattern5, + pub invested_capital: InPattern4, pub investor_cap: InPattern2, - pub loss: NegativeRawSumSupplyPattern, - pub net_pnl: CentsUsdPattern, - pub profit: RawSumSupplyPattern, + pub loss: NegativeRawRelSumSupplyPattern2, + pub net_pnl: CentsRelUsdPattern2, + pub profit: RawRelSumSupplyPattern2, pub sentiment: GreedNetPainPattern, } -impl GrossInvestedInvestorLossNetProfitSentimentPattern { +impl GrossInvestedInvestorLossNetProfitSentimentPattern2 { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { gross_pnl: CentsUsdPattern::new(client.clone(), _m(&acc, "unrealized_gross_pnl")), - invested_capital: InPattern5::new(client.clone(), _m(&acc, "invested_capital_in")), + invested_capital: InPattern4::new(client.clone(), _m(&acc, "invested_capital_in")), investor_cap: InPattern2::new(client.clone(), _m(&acc, "investor_cap_in")), - loss: NegativeRawSumSupplyPattern::new(client.clone(), acc.clone()), - net_pnl: CentsUsdPattern::new(client.clone(), _m(&acc, "net_unrealized_pnl")), - profit: RawSumSupplyPattern::new(client.clone(), acc.clone()), + loss: NegativeRawRelSumSupplyPattern2::new(client.clone(), acc.clone()), + net_pnl: CentsRelUsdPattern2::new(client.clone(), _m(&acc, "net_unrealized_pnl")), + profit: RawRelSumSupplyPattern2::new(client.clone(), acc.clone()), sentiment: GreedNetPainPattern::new(client.clone(), acc.clone()), } } } /// Pattern struct for repeated tree structure. -pub struct ActivityOutputsRealizedRelativeSupplyUnrealizedPattern { - pub activity: CoindaysSentPattern, - pub outputs: UtxoPattern2, - pub realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern, - pub relative: SupplyPattern, - pub supply: DeltaHalvedTotalPattern, - pub unrealized: InvestedInvestorLossNetProfitPattern, +pub struct NegativeRawRelSumSupplyPattern2 { + pub negative: MetricPattern1, + pub raw: CentsUsdPattern, + pub rel_to_market_cap: BpsPercentRatioPattern, + pub rel_to_own_gross_pnl: BpsPercentRatioPattern, + pub rel_to_own_market_cap: BpsPercentRatioPattern, + pub sum: _24hPattern, + pub supply: BtcCentsRelSatsUsdPattern3, } -impl ActivityOutputsRealizedRelativeSupplyUnrealizedPattern { +impl NegativeRawRelSumSupplyPattern2 { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - activity: CoindaysSentPattern::new(client.clone(), acc.clone()), - outputs: UtxoPattern2::new(client.clone(), _m(&acc, "utxo_count")), - realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern::new(client.clone(), acc.clone()), - relative: SupplyPattern::new(client.clone(), _m(&acc, "supply")), - supply: DeltaHalvedTotalPattern::new(client.clone(), _m(&acc, "supply")), - unrealized: InvestedInvestorLossNetProfitPattern::new(client.clone(), acc.clone()), + negative: MetricPattern1::new(client.clone(), _m(&acc, "neg_unrealized_loss")), + raw: CentsUsdPattern::new(client.clone(), _m(&acc, "unrealized_loss")), + rel_to_market_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "unrealized_loss_rel_to_market_cap")), + rel_to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "unrealized_loss_rel_to_own_gross_pnl")), + rel_to_own_market_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "unrealized_loss_rel_to_own_market_cap")), + sum: _24hPattern::new(client.clone(), _m(&acc, "unrealized_loss_24h")), + supply: BtcCentsRelSatsUsdPattern3::new(client.clone(), _m(&acc, "supply_in_loss")), } } } /// Pattern struct for repeated tree structure. -pub struct ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 { - pub activity: CoindaysSentPattern, - pub outputs: UtxoPattern2, - pub realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern, - pub relative: SupplyPattern, - pub supply: DeltaHalvedTotalPattern, - pub unrealized: LossNetProfitPattern2, +pub struct BtcCentsRelSatsUsdPattern3 { + pub btc: MetricPattern1, + pub cents: MetricPattern1, + pub rel_to_circulating_supply: BpsPercentRatioPattern, + pub rel_to_own_supply: BpsPercentRatioPattern, + pub sats: MetricPattern1, + pub usd: MetricPattern1, } -impl ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 { +impl BtcCentsRelSatsUsdPattern3 { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - activity: CoindaysSentPattern::new(client.clone(), acc.clone()), - outputs: UtxoPattern2::new(client.clone(), _m(&acc, "utxo_count")), - realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern::new(client.clone(), acc.clone()), - relative: SupplyPattern::new(client.clone(), _m(&acc, "supply")), - supply: DeltaHalvedTotalPattern::new(client.clone(), _m(&acc, "supply")), - unrealized: LossNetProfitPattern2::new(client.clone(), acc.clone()), + btc: MetricPattern1::new(client.clone(), acc.clone()), + cents: MetricPattern1::new(client.clone(), _m(&acc, "cents")), + rel_to_circulating_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_circulating_supply")), + rel_to_own_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_own_supply")), + sats: MetricPattern1::new(client.clone(), _m(&acc, "sats")), + usd: MetricPattern1::new(client.clone(), _m(&acc, "usd")), } } } @@ -1717,7 +1719,7 @@ impl CapLowerPriceUpperPattern { /// Pattern struct for repeated tree structure. pub struct ChangeCumulativeDeltaRawRelSumPattern { - pub change_1m: RelPattern2, + pub change_1m: RelPattern, pub cumulative: MetricPattern1, pub delta: ChangeRatePattern4, pub raw: MetricPattern1, @@ -1729,7 +1731,7 @@ impl ChangeCumulativeDeltaRawRelSumPattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - change_1m: RelPattern2::new(client.clone(), _m(&acc, "pnl_change_1m_rel_to")), + change_1m: RelPattern::new(client.clone(), _m(&acc, "pnl_change_1m_rel_to")), cumulative: MetricPattern1::new(client.clone(), _m(&acc, "realized_pnl_cumulative")), delta: ChangeRatePattern4::new(client.clone(), _m(&acc, "pnl_delta")), raw: MetricPattern1::new(client.clone(), _m(&acc, "realized_pnl")), @@ -1739,6 +1741,74 @@ impl ChangeCumulativeDeltaRawRelSumPattern { } } +/// Pattern struct for repeated tree structure. +pub struct RawRelSumSupplyPattern2 { + pub raw: CentsUsdPattern, + pub rel_to_market_cap: BpsPercentRatioPattern, + pub rel_to_own_gross_pnl: BpsPercentRatioPattern, + pub rel_to_own_market_cap: BpsPercentRatioPattern, + pub sum: _24hPattern, + pub supply: BtcCentsRelSatsUsdPattern3, +} + +impl RawRelSumSupplyPattern2 { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + raw: CentsUsdPattern::new(client.clone(), _m(&acc, "unrealized_profit")), + rel_to_market_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "unrealized_profit_rel_to_market_cap")), + rel_to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "unrealized_profit_rel_to_own_gross_pnl")), + rel_to_own_market_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "unrealized_profit_rel_to_own_market_cap")), + sum: _24hPattern::new(client.clone(), _m(&acc, "unrealized_profit_24h")), + supply: BtcCentsRelSatsUsdPattern3::new(client.clone(), _m(&acc, "supply_in_profit")), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct ActivityOutputsRealizedSupplyUnrealizedPattern { + pub activity: CoindaysSentPattern, + pub outputs: UtxoPattern2, + pub realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern, + pub supply: DeltaHalvedRelTotalPattern, + pub unrealized: InvestedInvestorLossNetProfitPattern, +} + +impl ActivityOutputsRealizedSupplyUnrealizedPattern { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + activity: CoindaysSentPattern::new(client.clone(), acc.clone()), + outputs: UtxoPattern2::new(client.clone(), _m(&acc, "utxo_count")), + realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern::new(client.clone(), acc.clone()), + supply: DeltaHalvedRelTotalPattern::new(client.clone(), _m(&acc, "supply")), + unrealized: InvestedInvestorLossNetProfitPattern::new(client.clone(), acc.clone()), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct ActivityOutputsRealizedSupplyUnrealizedPattern2 { + pub activity: CoindaysSentPattern, + pub outputs: UtxoPattern2, + pub realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern, + pub supply: DeltaHalvedRelTotalPattern, + pub unrealized: LossNetProfitPattern, +} + +impl ActivityOutputsRealizedSupplyUnrealizedPattern2 { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + activity: CoindaysSentPattern::new(client.clone(), acc.clone()), + outputs: UtxoPattern2::new(client.clone(), _m(&acc, "utxo_count")), + realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern::new(client.clone(), acc.clone()), + supply: DeltaHalvedRelTotalPattern::new(client.clone(), _m(&acc, "supply")), + unrealized: LossNetProfitPattern::new(client.clone(), acc.clone()), + } + } +} + /// Pattern struct for repeated tree structure. pub struct AddrOutputsRealizedSupplyPattern { pub addr_count: MetricPattern1, @@ -1762,44 +1832,44 @@ impl AddrOutputsRealizedSupplyPattern { } /// Pattern struct for repeated tree structure. -pub struct BtcCentsSatsSumUsdPattern2 { +pub struct BtcCentsRelSatsUsdPattern { pub btc: MetricPattern1, pub cents: MetricPattern1, + pub rel_to_circulating_supply: BpsPercentRatioPattern, pub sats: MetricPattern1, - pub sum: _1m1w1y24hPattern5, pub usd: MetricPattern1, } -impl BtcCentsSatsSumUsdPattern2 { +impl BtcCentsRelSatsUsdPattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { btc: MetricPattern1::new(client.clone(), acc.clone()), cents: MetricPattern1::new(client.clone(), _m(&acc, "cents")), + rel_to_circulating_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_circulating_supply")), sats: MetricPattern1::new(client.clone(), _m(&acc, "sats")), - sum: _1m1w1y24hPattern5::new(client.clone(), acc.clone()), usd: MetricPattern1::new(client.clone(), _m(&acc, "usd")), } } } /// Pattern struct for repeated tree structure. -pub struct BtcCentsSatsSumUsdPattern { +pub struct BtcCentsRelSatsUsdPattern2 { pub btc: MetricPattern1, pub cents: MetricPattern1, + pub rel_to_own_supply: BpsPercentRatioPattern, pub sats: MetricPattern1, - pub sum: _24hPattern3, pub usd: MetricPattern1, } -impl BtcCentsSatsSumUsdPattern { +impl BtcCentsRelSatsUsdPattern2 { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { btc: MetricPattern1::new(client.clone(), acc.clone()), cents: MetricPattern1::new(client.clone(), _m(&acc, "cents")), + rel_to_own_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_own_supply")), sats: MetricPattern1::new(client.clone(), _m(&acc, "sats")), - sum: _24hPattern3::new(client.clone(), _m(&acc, "24h")), usd: MetricPattern1::new(client.clone(), _m(&acc, "usd")), } } @@ -1827,28 +1897,6 @@ impl CentsDeltaRawRelUsdPattern { } } -/// Pattern struct for repeated tree structure. -pub struct CoinblocksCoindaysDormancySentVelocityPattern { - pub coinblocks_destroyed: CumulativeRawPattern, - pub coindays_destroyed: CumulativeRawSumPattern2, - pub dormancy: MetricPattern1, - pub sent: RawSumPattern3, - pub velocity: MetricPattern1, -} - -impl CoinblocksCoindaysDormancySentVelocityPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - coinblocks_destroyed: CumulativeRawPattern::new(client.clone(), _m(&acc, "coinblocks_destroyed")), - coindays_destroyed: CumulativeRawSumPattern2::new(client.clone(), _m(&acc, "coindays_destroyed")), - dormancy: MetricPattern1::new(client.clone(), _m(&acc, "dormancy")), - sent: RawSumPattern3::new(client.clone(), _m(&acc, "sent")), - velocity: MetricPattern1::new(client.clone(), _m(&acc, "velocity")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct EmaHistogramLineSignalPattern { pub ema_fast: MetricPattern1, @@ -1915,28 +1963,6 @@ impl PhsReboundThsPattern { } } -/// Pattern struct for repeated tree structure. -pub struct RatioValuePattern2 { - pub ratio: _1m1w1y24hPattern, - pub value_created: MetricPattern1, - pub value_created_sum: _1m1w1y24hPattern, - pub value_destroyed: MetricPattern1, - pub value_destroyed_sum: _1m1w1y24hPattern, -} - -impl RatioValuePattern2 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - ratio: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "sopr")), - value_created: MetricPattern1::new(client.clone(), _m(&acc, "value_created")), - value_created_sum: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "value_created")), - value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "value_destroyed")), - value_destroyed_sum: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "value_destroyed")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct _1m1w1y24hHeightPattern { pub _1m: MetricPattern1, @@ -2179,6 +2205,46 @@ impl BtcCentsSatsUsdPattern { } } +/// Pattern struct for repeated tree structure. +pub struct CentsRelUsdPattern2 { + pub cents: MetricPattern1, + pub rel_to_own_gross_pnl: BpsPercentRatioPattern, + pub rel_to_own_market_cap: BpsPercentRatioPattern, + pub usd: MetricPattern1, +} + +impl CentsRelUsdPattern2 { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + cents: MetricPattern1::new(client.clone(), _m(&acc, "cents")), + rel_to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_own_gross_pnl")), + rel_to_own_market_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_own_market_cap")), + usd: MetricPattern1::new(client.clone(), acc.clone()), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct CoindaysDormancySentVelocityPattern { + pub coindays_destroyed: CumulativeRawSumPattern, + pub dormancy: MetricPattern1, + pub sent: RawSumPattern3, + pub velocity: MetricPattern1, +} + +impl CoindaysDormancySentVelocityPattern { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + coindays_destroyed: CumulativeRawSumPattern::new(client.clone(), _m(&acc, "coindays_destroyed")), + dormancy: MetricPattern1::new(client.clone(), _m(&acc, "dormancy")), + sent: RawSumPattern3::new(client.clone(), _m(&acc, "sent")), + velocity: MetricPattern1::new(client.clone(), _m(&acc, "velocity")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct CumulativeNegativeRawSumPattern { pub cumulative: MetricPattern1, @@ -2199,6 +2265,46 @@ impl CumulativeNegativeRawSumPattern { } } +/// Pattern struct for repeated tree structure. +pub struct DeltaHalvedRelTotalPattern { + pub delta: ChangeRatePattern, + pub halved: BtcCentsSatsUsdPattern, + pub rel_to_circulating_supply: BpsPercentRatioPattern, + pub total: BtcCentsSatsUsdPattern, +} + +impl DeltaHalvedRelTotalPattern { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + delta: ChangeRatePattern::new(client.clone(), _m(&acc, "delta")), + halved: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "halved")), + rel_to_circulating_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_circulating_supply")), + total: BtcCentsSatsUsdPattern::new(client.clone(), acc.clone()), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct DeltaHalvedRelTotalPattern2 { + pub delta: ChangeRatePattern2, + pub halved: BtcCentsSatsUsdPattern, + pub rel_to_circulating_supply: BpsPercentRatioPattern, + pub total: BtcCentsSatsUsdPattern, +} + +impl DeltaHalvedRelTotalPattern2 { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + delta: ChangeRatePattern2::new(client.clone(), _m(&acc, "delta")), + halved: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "halved")), + rel_to_circulating_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_circulating_supply")), + total: BtcCentsSatsUsdPattern::new(client.clone(), acc.clone()), + } + } +} + /// Pattern struct for repeated tree structure. pub struct InvestedMaxMinPercentilesPattern { pub invested_capital: Pct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65Pct70Pct75Pct80Pct85Pct90Pct95Pattern, @@ -2224,7 +2330,7 @@ pub struct NegativeRawSumSupplyPattern { pub negative: MetricPattern1, pub raw: CentsUsdPattern, pub sum: _24hPattern, - pub supply: BtcCentsSatsUsdPattern, + pub supply: BtcCentsRelSatsUsdPattern, } impl NegativeRawSumSupplyPattern { @@ -2234,7 +2340,7 @@ impl NegativeRawSumSupplyPattern { negative: MetricPattern1::new(client.clone(), _m(&acc, "neg_unrealized_loss")), raw: CentsUsdPattern::new(client.clone(), _m(&acc, "unrealized_loss")), sum: _24hPattern::new(client.clone(), _m(&acc, "unrealized_loss_24h")), - supply: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "supply_in_loss")), + supply: BtcCentsRelSatsUsdPattern::new(client.clone(), _m(&acc, "supply_in_loss")), } } } @@ -2299,7 +2405,7 @@ impl BaseCumulativeSumPattern { /// Pattern struct for repeated tree structure. pub struct BlocksDominanceRewardsPattern { - pub blocks_mined: CumulativeHeightSumPattern, + pub blocks_mined: CumulativeRawSumPattern, pub dominance: _1m1w1y24hBpsPercentRatioPattern, pub rewards: BaseCumulativeSumPattern, } @@ -2308,7 +2414,7 @@ impl BlocksDominanceRewardsPattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - blocks_mined: CumulativeHeightSumPattern::new(client.clone(), _m(&acc, "blocks_mined")), + blocks_mined: CumulativeRawSumPattern::new(client.clone(), _m(&acc, "blocks_mined")), dominance: _1m1w1y24hBpsPercentRatioPattern::new(client.clone(), _m(&acc, "dominance")), rewards: BaseCumulativeSumPattern::new(client.clone(), _m(&acc, "rewards")), } @@ -2424,91 +2530,37 @@ impl CentsSatsUsdPattern { } /// Pattern struct for repeated tree structure. -pub struct CumulativeHeightRelPattern { +pub struct CumulativeRawRelPattern { pub cumulative: MetricPattern1, - pub height: MetricPattern18, + pub raw: MetricPattern1, pub rel_to_rcap: BpsPercentRatioPattern, } -impl CumulativeHeightRelPattern { +impl CumulativeRawRelPattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - height: MetricPattern18::new(client.clone(), acc.clone()), + raw: MetricPattern1::new(client.clone(), acc.clone()), rel_to_rcap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_realized_cap")), } } } /// Pattern struct for repeated tree structure. -pub struct CumulativeRawSumPattern { +pub struct CumulativeRawSumPattern2 { pub cumulative: MetricPattern1, pub raw: CentsUsdPattern, pub sum: _24hPattern, } -impl CumulativeRawSumPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - raw: CentsUsdPattern::new(client.clone(), acc.clone()), - sum: _24hPattern::new(client.clone(), _m(&acc, "24h")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct CumulativeRawSumPattern2 { - pub cumulative: MetricPattern1, - pub raw: MetricPattern1, - pub sum: _1m1w1y24hPattern, -} - impl CumulativeRawSumPattern2 { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - raw: MetricPattern1::new(client.clone(), acc.clone()), - sum: _1m1w1y24hPattern::new(client.clone(), acc.clone()), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct DeltaHalvedTotalPattern { - pub delta: ChangeRatePattern, - pub halved: BtcCentsSatsUsdPattern, - pub total: BtcCentsSatsUsdPattern, -} - -impl DeltaHalvedTotalPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - delta: ChangeRatePattern::new(client.clone(), _m(&acc, "delta")), - halved: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "halved")), - total: BtcCentsSatsUsdPattern::new(client.clone(), acc.clone()), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct DeltaHalvedTotalPattern2 { - pub delta: ChangeRatePattern2, - pub halved: BtcCentsSatsUsdPattern, - pub total: BtcCentsSatsUsdPattern, -} - -impl DeltaHalvedTotalPattern2 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - delta: ChangeRatePattern2::new(client.clone(), _m(&acc, "delta")), - halved: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "halved")), - total: BtcCentsSatsUsdPattern::new(client.clone(), acc.clone()), + raw: CentsUsdPattern::new(client.clone(), acc.clone()), + sum: _24hPattern::new(client.clone(), _m(&acc, "24h")), } } } @@ -2532,49 +2584,13 @@ impl GreedNetPainPattern { } /// Pattern struct for repeated tree structure. -pub struct InRelPattern { - pub in_loss: RelPattern, - pub in_profit: RelPattern, - pub rel_to_circulating_supply: BpsPercentRatioPattern, -} - -impl InRelPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - in_loss: RelPattern::new(client.clone(), _m(&acc, "in_loss_rel_to_circulating_supply")), - in_profit: RelPattern::new(client.clone(), _m(&acc, "in_profit_rel_to_circulating_supply")), - rel_to_circulating_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_circulating_supply")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct InRelPattern2 { - pub in_loss: RelPattern6, - pub in_profit: RelPattern6, - pub rel_to_circulating_supply: BpsPercentRatioPattern, -} - -impl InRelPattern2 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - in_loss: RelPattern6::new(client.clone(), _m(&acc, "in_loss_rel_to")), - in_profit: RelPattern6::new(client.clone(), _m(&acc, "in_profit_rel_to")), - rel_to_circulating_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "rel_to_circulating_supply")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct LossNetProfitPattern2 { +pub struct LossNetProfitPattern { pub loss: NegativeRawSumSupplyPattern, pub net_pnl: CentsUsdPattern, pub profit: RawSumSupplyPattern, } -impl LossNetProfitPattern2 { +impl LossNetProfitPattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { @@ -2585,24 +2601,6 @@ impl LossNetProfitPattern2 { } } -/// Pattern struct for repeated tree structure. -pub struct LossNetProfitPattern3 { - pub loss: RelPattern7, - pub net_pnl: RelPattern8, - pub profit: RelPattern7, -} - -impl LossNetProfitPattern3 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - loss: RelPattern7::new(client.clone(), _m(&acc, "unrealized_loss_rel_to")), - net_pnl: RelPattern8::new(client.clone(), _m(&acc, "net_unrealized_pnl_rel_to_own")), - profit: RelPattern7::new(client.clone(), _m(&acc, "unrealized_profit_rel_to")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct OutputsRealizedSupplyPattern { pub outputs: UtxoPattern, @@ -2621,6 +2619,24 @@ impl OutputsRealizedSupplyPattern { } } +/// Pattern struct for repeated tree structure. +pub struct RatioValuePattern2 { + pub ratio: _1m1w1y24hPattern, + pub value_created: BaseSumPattern, + pub value_destroyed: BaseSumPattern, +} + +impl RatioValuePattern2 { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + ratio: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "sopr")), + value_created: BaseSumPattern::new(client.clone(), _m(&acc, "value_created")), + value_destroyed: BaseSumPattern::new(client.clone(), _m(&acc, "value_destroyed")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct RatioValuePattern { pub ratio: _24hPattern2, @@ -2661,7 +2677,7 @@ impl RawSellSumPattern { pub struct RawSumSupplyPattern { pub raw: CentsUsdPattern, pub sum: _24hPattern, - pub supply: BtcCentsSatsUsdPattern, + pub supply: BtcCentsRelSatsUsdPattern, } impl RawSumSupplyPattern { @@ -2670,25 +2686,25 @@ impl RawSumSupplyPattern { Self { raw: CentsUsdPattern::new(client.clone(), _m(&acc, "unrealized_profit")), sum: _24hPattern::new(client.clone(), _m(&acc, "unrealized_profit_24h")), - supply: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "supply_in_profit")), + supply: BtcCentsRelSatsUsdPattern::new(client.clone(), _m(&acc, "supply_in_profit")), } } } /// Pattern struct for repeated tree structure. -pub struct RelPattern7 { - pub rel_to_market_cap: BpsPercentRatioPattern, - pub rel_to_own_gross_pnl: BpsPercentRatioPattern, - pub rel_to_own_market_cap: BpsPercentRatioPattern, +pub struct RawSumSupplyPattern2 { + pub raw: CentsUsdPattern, + pub sum: _24hPattern, + pub supply: BtcCentsSatsUsdPattern, } -impl RelPattern7 { +impl RawSumSupplyPattern2 { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - rel_to_market_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "market_cap")), - rel_to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "own_gross_pnl")), - rel_to_own_market_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "own_market_cap")), + raw: CentsUsdPattern::new(client.clone(), _m(&acc, "unrealized_profit")), + sum: _24hPattern::new(client.clone(), _m(&acc, "unrealized_profit_24h")), + supply: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "supply_in_profit")), } } } @@ -2712,18 +2728,18 @@ impl _6bBlockTxindexPattern { } /// Pattern struct for repeated tree structure. -pub struct CumulativeHeightSumPattern { +pub struct CumulativeRawSumPattern { pub cumulative: MetricPattern1, - pub height: MetricPattern18, + pub raw: MetricPattern1, pub sum: _1m1w1y24hPattern, } -impl CumulativeHeightSumPattern { +impl CumulativeRawSumPattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - height: MetricPattern18::new(client.clone(), acc.clone()), + raw: MetricPattern1::new(client.clone(), acc.clone()), sum: _1m1w1y24hPattern::new(client.clone(), acc.clone()), } } @@ -2763,7 +2779,7 @@ impl BaseSumPattern { /// Pattern struct for repeated tree structure. pub struct BlocksDominancePattern { - pub blocks_mined: CumulativeHeightPattern, + pub blocks_mined: CumulativeRawPattern, pub dominance: BpsPercentRatioPattern, } @@ -2771,7 +2787,7 @@ impl BlocksDominancePattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - blocks_mined: CumulativeHeightPattern::new(client.clone(), _m(&acc, "blocks_mined")), + blocks_mined: CumulativeRawPattern::new(client.clone(), _m(&acc, "blocks_mined")), dominance: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "dominance")), } } @@ -2889,38 +2905,6 @@ impl CoindaysSentPattern { } } -/// Pattern struct for repeated tree structure. -pub struct CumulativeRawPattern { - pub cumulative: MetricPattern1, - pub raw: MetricPattern1, -} - -impl CumulativeRawPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - raw: MetricPattern1::new(client.clone(), acc.clone()), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct CumulativeHeightPattern { - pub cumulative: MetricPattern1, - pub height: MetricPattern18, -} - -impl CumulativeHeightPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - height: MetricPattern18::new(client.clone(), acc.clone()), - } - } -} - /// Pattern struct for repeated tree structure. pub struct HalvedTotalPattern { pub halved: BtcCentsSatsUsdPattern, @@ -2938,60 +2922,12 @@ impl HalvedTotalPattern { } /// Pattern struct for repeated tree structure. -pub struct HeightSumPattern { - pub height: MetricPattern18, - pub sum: _1m1w1y24hPattern, -} - -impl HeightSumPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - height: MetricPattern18::new(client.clone(), acc.clone()), - sum: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "sum")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct InPattern { - pub in_loss: BtcCentsSatsSumUsdPattern, - pub in_profit: BtcCentsSatsSumUsdPattern, -} - -impl InPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - in_loss: BtcCentsSatsSumUsdPattern::new(client.clone(), _m(&acc, "loss")), - in_profit: BtcCentsSatsSumUsdPattern::new(client.clone(), _m(&acc, "profit")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct InPattern3 { - pub in_loss: BtcCentsSatsSumUsdPattern2, - pub in_profit: BtcCentsSatsSumUsdPattern2, -} - -impl InPattern3 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - in_loss: BtcCentsSatsSumUsdPattern2::new(client.clone(), _m(&acc, "loss")), - in_profit: BtcCentsSatsSumUsdPattern2::new(client.clone(), _m(&acc, "profit")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct InPattern5 { +pub struct InPattern4 { pub in_loss: CentsRawUsdPattern, pub in_profit: CentsRawUsdPattern, } -impl InPattern5 { +impl InPattern4 { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { @@ -3017,18 +2953,50 @@ impl InPattern2 { } } +/// Pattern struct for repeated tree structure. +pub struct InPattern { + pub in_loss: RawSumPattern4, + pub in_profit: RawSumPattern4, +} + +impl InPattern { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + in_loss: RawSumPattern4::new(client.clone(), _m(&acc, "loss")), + in_profit: RawSumPattern4::new(client.clone(), _m(&acc, "profit")), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct InPattern3 { + pub in_loss: RawSumPattern5, + pub in_profit: RawSumPattern5, +} + +impl InPattern3 { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + in_loss: RawSumPattern5::new(client.clone(), _m(&acc, "loss")), + in_profit: RawSumPattern5::new(client.clone(), _m(&acc, "profit")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct LossProfitPattern2 { - pub loss: RawSumSupplyPattern, - pub profit: RawSumSupplyPattern, + pub loss: RawSumSupplyPattern2, + pub profit: RawSumSupplyPattern2, } impl LossProfitPattern2 { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - loss: RawSumSupplyPattern::new(client.clone(), acc.clone()), - profit: RawSumSupplyPattern::new(client.clone(), acc.clone()), + loss: RawSumSupplyPattern2::new(client.clone(), acc.clone()), + profit: RawSumSupplyPattern2::new(client.clone(), acc.clone()), } } } @@ -3049,6 +3017,38 @@ impl PriceValuePattern { } } +/// Pattern struct for repeated tree structure. +pub struct RawSumPattern5 { + pub raw: BtcCentsSatsUsdPattern, + pub sum: _1m1w1y24hPattern5, +} + +impl RawSumPattern5 { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + raw: BtcCentsSatsUsdPattern::new(client.clone(), acc.clone()), + sum: _1m1w1y24hPattern5::new(client.clone(), acc.clone()), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct RawSumPattern4 { + pub raw: BtcCentsSatsUsdPattern, + pub sum: _24hPattern3, +} + +impl RawSumPattern4 { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + raw: BtcCentsSatsUsdPattern::new(client.clone(), acc.clone()), + sum: _24hPattern3::new(client.clone(), _m(&acc, "24h")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct RawSumPattern { pub raw: CentsUsdPattern, @@ -3082,44 +3082,12 @@ impl RealizedSupplyPattern { } /// Pattern struct for repeated tree structure. -pub struct RelPattern6 { - pub rel_to_circulating_supply: BpsPercentRatioPattern, - pub rel_to_own_supply: BpsPercentRatioPattern, -} - -impl RelPattern6 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - rel_to_circulating_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "circulating_supply")), - rel_to_own_supply: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "own_supply")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct RelPattern4 { - pub rel_to_market_cap: BpsPercentRatioPattern, - pub rel_to_own_gross_pnl: BpsPercentRatioPattern, -} - -impl RelPattern4 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - rel_to_market_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "market_cap")), - rel_to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "own_gross_pnl")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct RelPattern2 { +pub struct RelPattern { pub rel_to_mcap: BpsPercentRatioPattern, pub rel_to_rcap: BpsPercentRatioPattern, } -impl RelPattern2 { +impl RelPattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { @@ -3129,22 +3097,6 @@ impl RelPattern2 { } } -/// Pattern struct for repeated tree structure. -pub struct RelPattern8 { - pub rel_to_own_gross_pnl: BpsPercentRatioPattern, - pub rel_to_own_market_cap: BpsPercentRatioPattern, -} - -impl RelPattern8 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - rel_to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "gross_pnl")), - rel_to_own_market_cap: BpsPercentRatioPattern::new(client.clone(), _m(&acc, "market_cap")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct SdSmaPattern { pub sd: MetricPattern1, @@ -3161,22 +3113,6 @@ impl SdSmaPattern { } } -/// Pattern struct for repeated tree structure. -pub struct SupplyUnrealizedPattern2 { - pub supply: InRelPattern2, - pub unrealized: LossNetProfitPattern3, -} - -impl SupplyUnrealizedPattern2 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - supply: InRelPattern2::new(client.clone(), _m(&acc, "supply")), - unrealized: LossNetProfitPattern3::new(client.clone(), acc.clone()), - } - } -} - /// Pattern struct for repeated tree structure. pub struct UtxoPattern2 { pub utxo_count: MetricPattern1, @@ -3225,6 +3161,22 @@ impl ValuePattern { } } +/// Pattern struct for repeated tree structure. +pub struct CumulativeRawPattern { + pub cumulative: MetricPattern1, + pub raw: MetricPattern1, +} + +impl CumulativeRawPattern { + /// Create a new pattern node with accumulated metric name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), + raw: MetricPattern1::new(client.clone(), acc.clone()), + } + } +} + /// Pattern struct for repeated tree structure. pub struct RawSumPattern3 { pub raw: MetricPattern1, @@ -3236,7 +3188,7 @@ impl RawSumPattern3 { pub fn new(client: Arc, acc: String) -> Self { Self { raw: MetricPattern1::new(client.clone(), acc.clone()), - sum: _1m1w1y24hPattern::new(client.clone(), acc.clone()), + sum: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "sum")), } } } @@ -3313,48 +3265,6 @@ impl _24hPattern { } } -/// Pattern struct for repeated tree structure. -pub struct RelPattern { - pub rel_to_circulating_supply: BpsPercentRatioPattern, -} - -impl RelPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - rel_to_circulating_supply: BpsPercentRatioPattern::new(client.clone(), acc.clone()), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct RelPattern3 { - pub rel_to_own_supply: BpsPercentRatioPattern, -} - -impl RelPattern3 { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - rel_to_own_supply: BpsPercentRatioPattern::new(client.clone(), acc.clone()), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct SupplyPattern { - pub supply: InRelPattern, -} - -impl SupplyPattern { - /// Create a new pattern node with accumulated metric name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - supply: InRelPattern::new(client.clone(), acc.clone()), - } - } -} - /// Pattern struct for repeated tree structure. pub struct UtxoPattern { pub utxo_count: MetricPattern1, @@ -3426,6 +3336,7 @@ pub struct MetricsTree { pub cointime: MetricsTree_Cointime, pub constants: MetricsTree_Constants, pub indexes: MetricsTree_Indexes, + pub indicators: MetricsTree_Indicators, pub market: MetricsTree_Market, pub pools: MetricsTree_Pools, pub prices: MetricsTree_Prices, @@ -3447,6 +3358,7 @@ impl MetricsTree { cointime: MetricsTree_Cointime::new(client.clone(), format!("{base_path}_cointime")), constants: MetricsTree_Constants::new(client.clone(), format!("{base_path}_constants")), indexes: MetricsTree_Indexes::new(client.clone(), format!("{base_path}_indexes")), + indicators: MetricsTree_Indicators::new(client.clone(), format!("{base_path}_indicators")), market: MetricsTree_Market::new(client.clone(), format!("{base_path}_market")), pools: MetricsTree_Pools::new(client.clone(), format!("{base_path}_pools")), prices: MetricsTree_Prices::new(client.clone(), format!("{base_path}_prices")), @@ -3467,7 +3379,7 @@ pub struct MetricsTree_Blocks { pub lookback: MetricsTree_Blocks_Lookback, pub interval: _1m1w1y24hHeightPattern, pub halving: MetricsTree_Blocks_Halving, - pub vbytes: AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern, + pub vbytes: AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern, pub fullness: MetricsTree_Blocks_Fullness, } @@ -3483,7 +3395,7 @@ impl MetricsTree_Blocks { lookback: MetricsTree_Blocks_Lookback::new(client.clone(), format!("{base_path}_lookback")), interval: _1m1w1y24hHeightPattern::new(client.clone(), "block_interval".to_string()), halving: MetricsTree_Blocks_Halving::new(client.clone(), format!("{base_path}_halving")), - vbytes: AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), "block_vbytes".to_string()), + vbytes: AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern::new(client.clone(), "block_vbytes".to_string()), fullness: MetricsTree_Blocks_Fullness::new(client.clone(), format!("{base_path}_fullness")), } } @@ -3598,14 +3510,14 @@ impl MetricsTree_Blocks_Weight { /// Metrics tree node. pub struct MetricsTree_Blocks_Count { pub block_count_target: MetricPattern1, - pub block_count: CumulativeHeightSumPattern, + pub block_count: CumulativeRawSumPattern, } impl MetricsTree_Blocks_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { block_count_target: MetricPattern1::new(client.clone(), "block_count_target".to_string()), - block_count: CumulativeHeightSumPattern::new(client.clone(), "block_count".to_string()), + block_count: CumulativeRawSumPattern::new(client.clone(), "block_count".to_string()), } } } @@ -3784,14 +3696,14 @@ impl MetricsTree_Transactions { /// Metrics tree node. pub struct MetricsTree_Transactions_Count { - pub tx_count: AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern, + pub tx_count: AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern, pub is_coinbase: MetricPattern19, } impl MetricsTree_Transactions_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - tx_count: AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), "tx_count".to_string()), + tx_count: AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern::new(client.clone(), "tx_count".to_string()), is_coinbase: MetricPattern19::new(client.clone(), "is_coinbase".to_string()), } } @@ -3833,17 +3745,17 @@ impl MetricsTree_Transactions_Fees { /// Metrics tree node. pub struct MetricsTree_Transactions_Versions { - pub v1: CumulativeHeightSumPattern, - pub v2: CumulativeHeightSumPattern, - pub v3: CumulativeHeightSumPattern, + pub v1: CumulativeRawSumPattern, + pub v2: CumulativeRawSumPattern, + pub v3: CumulativeRawSumPattern, } impl MetricsTree_Transactions_Versions { pub fn new(client: Arc, base_path: String) -> Self { Self { - v1: CumulativeHeightSumPattern::new(client.clone(), "tx_v1".to_string()), - v2: CumulativeHeightSumPattern::new(client.clone(), "tx_v2".to_string()), - v3: CumulativeHeightSumPattern::new(client.clone(), "tx_v3".to_string()), + v1: CumulativeRawSumPattern::new(client.clone(), "tx_v1".to_string()), + v2: CumulativeRawSumPattern::new(client.clone(), "tx_v2".to_string()), + v3: CumulativeRawSumPattern::new(client.clone(), "tx_v3".to_string()), } } } @@ -4042,37 +3954,37 @@ impl MetricsTree_Scripts { /// Metrics tree node. pub struct MetricsTree_Scripts_Count { - pub p2a: CumulativeHeightSumPattern, - pub p2ms: CumulativeHeightSumPattern, - pub p2pk33: CumulativeHeightSumPattern, - pub p2pk65: CumulativeHeightSumPattern, - pub p2pkh: CumulativeHeightSumPattern, - pub p2sh: CumulativeHeightSumPattern, - pub p2tr: CumulativeHeightSumPattern, - pub p2wpkh: CumulativeHeightSumPattern, - pub p2wsh: CumulativeHeightSumPattern, - pub opreturn: CumulativeHeightSumPattern, - pub emptyoutput: CumulativeHeightSumPattern, - pub unknownoutput: CumulativeHeightSumPattern, - pub segwit: CumulativeHeightSumPattern, + pub p2a: CumulativeRawSumPattern, + pub p2ms: CumulativeRawSumPattern, + pub p2pk33: CumulativeRawSumPattern, + pub p2pk65: CumulativeRawSumPattern, + pub p2pkh: CumulativeRawSumPattern, + pub p2sh: CumulativeRawSumPattern, + pub p2tr: CumulativeRawSumPattern, + pub p2wpkh: CumulativeRawSumPattern, + pub p2wsh: CumulativeRawSumPattern, + pub opreturn: CumulativeRawSumPattern, + pub emptyoutput: CumulativeRawSumPattern, + pub unknownoutput: CumulativeRawSumPattern, + pub segwit: CumulativeRawSumPattern, } impl MetricsTree_Scripts_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2a: CumulativeHeightSumPattern::new(client.clone(), "p2a_count".to_string()), - p2ms: CumulativeHeightSumPattern::new(client.clone(), "p2ms_count".to_string()), - p2pk33: CumulativeHeightSumPattern::new(client.clone(), "p2pk33_count".to_string()), - p2pk65: CumulativeHeightSumPattern::new(client.clone(), "p2pk65_count".to_string()), - p2pkh: CumulativeHeightSumPattern::new(client.clone(), "p2pkh_count".to_string()), - p2sh: CumulativeHeightSumPattern::new(client.clone(), "p2sh_count".to_string()), - p2tr: CumulativeHeightSumPattern::new(client.clone(), "p2tr_count".to_string()), - p2wpkh: CumulativeHeightSumPattern::new(client.clone(), "p2wpkh_count".to_string()), - p2wsh: CumulativeHeightSumPattern::new(client.clone(), "p2wsh_count".to_string()), - opreturn: CumulativeHeightSumPattern::new(client.clone(), "opreturn_count".to_string()), - emptyoutput: CumulativeHeightSumPattern::new(client.clone(), "emptyoutput_count".to_string()), - unknownoutput: CumulativeHeightSumPattern::new(client.clone(), "unknownoutput_count".to_string()), - segwit: CumulativeHeightSumPattern::new(client.clone(), "segwit_count".to_string()), + p2a: CumulativeRawSumPattern::new(client.clone(), "p2a_count".to_string()), + p2ms: CumulativeRawSumPattern::new(client.clone(), "p2ms_count".to_string()), + p2pk33: CumulativeRawSumPattern::new(client.clone(), "p2pk33_count".to_string()), + p2pk65: CumulativeRawSumPattern::new(client.clone(), "p2pk65_count".to_string()), + p2pkh: CumulativeRawSumPattern::new(client.clone(), "p2pkh_count".to_string()), + p2sh: CumulativeRawSumPattern::new(client.clone(), "p2sh_count".to_string()), + p2tr: CumulativeRawSumPattern::new(client.clone(), "p2tr_count".to_string()), + p2wpkh: CumulativeRawSumPattern::new(client.clone(), "p2wpkh_count".to_string()), + p2wsh: CumulativeRawSumPattern::new(client.clone(), "p2wsh_count".to_string()), + opreturn: CumulativeRawSumPattern::new(client.clone(), "opreturn_count".to_string()), + emptyoutput: CumulativeRawSumPattern::new(client.clone(), "emptyoutput_count".to_string()), + unknownoutput: CumulativeRawSumPattern::new(client.clone(), "unknownoutput_count".to_string()), + segwit: CumulativeRawSumPattern::new(client.clone(), "segwit_count".to_string()), } } } @@ -4129,6 +4041,7 @@ pub struct MetricsTree_Mining_Rewards { pub fee_dominance: _1m1w1y24hBpsPercentRatioPattern, pub subsidy_dominance: _1m1w1y24hBpsPercentRatioPattern, pub subsidy_sma_1y: CentsUsdPattern, + pub fee_ratio_multiple: MetricsTree_Mining_Rewards_FeeRatioMultiple, } impl MetricsTree_Mining_Rewards { @@ -4141,6 +4054,7 @@ impl MetricsTree_Mining_Rewards { fee_dominance: _1m1w1y24hBpsPercentRatioPattern::new(client.clone(), "fee_dominance".to_string()), subsidy_dominance: _1m1w1y24hBpsPercentRatioPattern::new(client.clone(), "subsidy_dominance".to_string()), subsidy_sma_1y: CentsUsdPattern::new(client.clone(), "subsidy_sma_1y".to_string()), + fee_ratio_multiple: MetricsTree_Mining_Rewards_FeeRatioMultiple::new(client.clone(), format!("{base_path}_fee_ratio_multiple")), } } } @@ -4168,6 +4082,25 @@ impl MetricsTree_Mining_Rewards_Fees { } } +/// Metrics tree node. +pub struct MetricsTree_Mining_Rewards_FeeRatioMultiple { + pub _24h: BpsRatioPattern, + pub _1w: BpsRatioPattern, + pub _1m: BpsRatioPattern, + pub _1y: BpsRatioPattern, +} + +impl MetricsTree_Mining_Rewards_FeeRatioMultiple { + pub fn new(client: Arc, base_path: String) -> Self { + Self { + _24h: BpsRatioPattern::new(client.clone(), "fee_ratio_multiple_24h".to_string()), + _1w: BpsRatioPattern::new(client.clone(), "fee_ratio_multiple_1w".to_string()), + _1m: BpsRatioPattern::new(client.clone(), "fee_ratio_multiple_1m".to_string()), + _1y: BpsRatioPattern::new(client.clone(), "fee_ratio_multiple_1y".to_string()), + } + } +} + /// Metrics tree node. pub struct MetricsTree_Mining_Hashrate { pub hash_rate: MetricPattern1, @@ -4252,8 +4185,8 @@ impl MetricsTree_Cointime { /// Metrics tree node. pub struct MetricsTree_Cointime_Activity { - pub coinblocks_created: CumulativeHeightSumPattern, - pub coinblocks_stored: CumulativeHeightSumPattern, + pub coinblocks_created: CumulativeRawSumPattern, + pub coinblocks_stored: CumulativeRawSumPattern, pub liveliness: MetricPattern1, pub vaultedness: MetricPattern1, pub activity_to_vaultedness_ratio: MetricPattern1, @@ -4262,8 +4195,8 @@ pub struct MetricsTree_Cointime_Activity { impl MetricsTree_Cointime_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - coinblocks_created: CumulativeHeightSumPattern::new(client.clone(), "coinblocks_created".to_string()), - coinblocks_stored: CumulativeHeightSumPattern::new(client.clone(), "coinblocks_stored".to_string()), + coinblocks_created: CumulativeRawSumPattern::new(client.clone(), "coinblocks_created".to_string()), + coinblocks_stored: CumulativeRawSumPattern::new(client.clone(), "coinblocks_stored".to_string()), liveliness: MetricPattern1::new(client.clone(), "liveliness".to_string()), vaultedness: MetricPattern1::new(client.clone(), "vaultedness".to_string()), activity_to_vaultedness_ratio: MetricPattern1::new(client.clone(), "activity_to_vaultedness_ratio".to_string()), @@ -4288,19 +4221,19 @@ impl MetricsTree_Cointime_Supply { /// Metrics tree node. pub struct MetricsTree_Cointime_Value { - pub value_destroyed: CumulativeHeightSumPattern, - pub value_created: CumulativeHeightSumPattern, - pub value_stored: CumulativeHeightSumPattern, - pub vocdd: CumulativeHeightSumPattern, + pub value_destroyed: CumulativeRawSumPattern, + pub value_created: CumulativeRawSumPattern, + pub value_stored: CumulativeRawSumPattern, + pub vocdd: CumulativeRawSumPattern, } impl MetricsTree_Cointime_Value { pub fn new(client: Arc, base_path: String) -> Self { Self { - value_destroyed: CumulativeHeightSumPattern::new(client.clone(), "cointime_value_destroyed".to_string()), - value_created: CumulativeHeightSumPattern::new(client.clone(), "cointime_value_created".to_string()), - value_stored: CumulativeHeightSumPattern::new(client.clone(), "cointime_value_stored".to_string()), - vocdd: CumulativeHeightSumPattern::new(client.clone(), "vocdd".to_string()), + value_destroyed: CumulativeRawSumPattern::new(client.clone(), "cointime_value_destroyed".to_string()), + value_created: CumulativeRawSumPattern::new(client.clone(), "cointime_value_created".to_string()), + value_stored: CumulativeRawSumPattern::new(client.clone(), "cointime_value_stored".to_string()), + vocdd: CumulativeRawSumPattern::new(client.clone(), "vocdd".to_string()), } } } @@ -4355,34 +4288,34 @@ impl MetricsTree_Cointime_Pricing { /// Metrics tree node. pub struct MetricsTree_Cointime_Adjusted { - pub adj_inflation_rate: BpsPercentRatioPattern, - pub adj_tx_velocity_btc: MetricPattern1, - pub adj_tx_velocity_usd: MetricPattern1, + pub inflation_rate: BpsPercentRatioPattern, + pub tx_velocity_btc: MetricPattern1, + pub tx_velocity_usd: MetricPattern1, } impl MetricsTree_Cointime_Adjusted { pub fn new(client: Arc, base_path: String) -> Self { Self { - adj_inflation_rate: BpsPercentRatioPattern::new(client.clone(), "cointime_adj_inflation_rate".to_string()), - adj_tx_velocity_btc: MetricPattern1::new(client.clone(), "cointime_adj_tx_velocity_btc".to_string()), - adj_tx_velocity_usd: MetricPattern1::new(client.clone(), "cointime_adj_tx_velocity_usd".to_string()), + inflation_rate: BpsPercentRatioPattern::new(client.clone(), "cointime_adj_inflation_rate".to_string()), + tx_velocity_btc: MetricPattern1::new(client.clone(), "cointime_adj_tx_velocity_btc".to_string()), + tx_velocity_usd: MetricPattern1::new(client.clone(), "cointime_adj_tx_velocity_usd".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Cointime_ReserveRisk { + pub value: MetricPattern1, pub vocdd_median_1y: MetricPattern18, pub hodl_bank: MetricPattern18, - pub reserve_risk: MetricPattern1, } impl MetricsTree_Cointime_ReserveRisk { pub fn new(client: Arc, base_path: String) -> Self { Self { + value: MetricPattern1::new(client.clone(), "reserve_risk".to_string()), vocdd_median_1y: MetricPattern18::new(client.clone(), "vocdd_median_1y".to_string()), hodl_bank: MetricPattern18::new(client.clone(), "hodl_bank".to_string()), - reserve_risk: MetricPattern1::new(client.clone(), "reserve_risk".to_string()), } } } @@ -5007,6 +4940,25 @@ impl MetricsTree_Indexes_Txoutindex { } } +/// Metrics tree node. +pub struct MetricsTree_Indicators { + pub puell_multiple: BpsRatioPattern, + pub nvt: BpsRatioPattern, + pub gini: BpsPercentRatioPattern, + pub rhodl_ratio: BpsRatioPattern, +} + +impl MetricsTree_Indicators { + pub fn new(client: Arc, base_path: String) -> Self { + Self { + puell_multiple: BpsRatioPattern::new(client.clone(), "puell_multiple".to_string()), + nvt: BpsRatioPattern::new(client.clone(), "nvt".to_string()), + gini: BpsPercentRatioPattern::new(client.clone(), "gini".to_string()), + rhodl_ratio: BpsRatioPattern::new(client.clone(), "rhodl_ratio".to_string()), + } + } +} + /// Metrics tree node. pub struct MetricsTree_Market { pub ath: MetricsTree_Market_Ath, @@ -5016,7 +4968,7 @@ pub struct MetricsTree_Market { pub range: MetricsTree_Market_Range, pub moving_average: MetricsTree_Market_MovingAverage, pub dca: MetricsTree_Market_Dca, - pub indicators: MetricsTree_Market_Indicators, + pub technical: MetricsTree_Market_Technical, } impl MetricsTree_Market { @@ -5029,7 +4981,7 @@ impl MetricsTree_Market { range: MetricsTree_Market_Range::new(client.clone(), format!("{base_path}_range")), moving_average: MetricsTree_Market_MovingAverage::new(client.clone(), format!("{base_path}_moving_average")), dca: MetricsTree_Market_Dca::new(client.clone(), format!("{base_path}_dca")), - indicators: MetricsTree_Market_Indicators::new(client.clone(), format!("{base_path}_indicators")), + technical: MetricsTree_Market_Technical::new(client.clone(), format!("{base_path}_technical")), } } } @@ -6056,53 +6008,47 @@ impl MetricsTree_Market_Dca_ClassReturn { } /// Metrics tree node. -pub struct MetricsTree_Market_Indicators { - pub puell_multiple: BpsRatioPattern, - pub nvt: BpsRatioPattern, - pub rsi: MetricsTree_Market_Indicators_Rsi, +pub struct MetricsTree_Market_Technical { + pub rsi: MetricsTree_Market_Technical_Rsi, pub stoch_k: BpsPercentRatioPattern, pub stoch_d: BpsPercentRatioPattern, pub pi_cycle: BpsRatioPattern, - pub macd: MetricsTree_Market_Indicators_Macd, - pub gini: BpsPercentRatioPattern, + pub macd: MetricsTree_Market_Technical_Macd, } -impl MetricsTree_Market_Indicators { +impl MetricsTree_Market_Technical { pub fn new(client: Arc, base_path: String) -> Self { Self { - puell_multiple: BpsRatioPattern::new(client.clone(), "puell_multiple".to_string()), - nvt: BpsRatioPattern::new(client.clone(), "nvt".to_string()), - rsi: MetricsTree_Market_Indicators_Rsi::new(client.clone(), format!("{base_path}_rsi")), + rsi: MetricsTree_Market_Technical_Rsi::new(client.clone(), format!("{base_path}_rsi")), stoch_k: BpsPercentRatioPattern::new(client.clone(), "stoch_k".to_string()), stoch_d: BpsPercentRatioPattern::new(client.clone(), "stoch_d".to_string()), pi_cycle: BpsRatioPattern::new(client.clone(), "pi_cycle".to_string()), - macd: MetricsTree_Market_Indicators_Macd::new(client.clone(), format!("{base_path}_macd")), - gini: BpsPercentRatioPattern::new(client.clone(), "gini".to_string()), + macd: MetricsTree_Market_Technical_Macd::new(client.clone(), format!("{base_path}_macd")), } } } /// Metrics tree node. -pub struct MetricsTree_Market_Indicators_Rsi { +pub struct MetricsTree_Market_Technical_Rsi { pub _24h: AverageGainsLossesRsiStochPattern, - pub _1w: MetricsTree_Market_Indicators_Rsi_1w, - pub _1m: MetricsTree_Market_Indicators_Rsi_1m, - pub _1y: MetricsTree_Market_Indicators_Rsi_1y, + pub _1w: MetricsTree_Market_Technical_Rsi_1w, + pub _1m: MetricsTree_Market_Technical_Rsi_1m, + pub _1y: MetricsTree_Market_Technical_Rsi_1y, } -impl MetricsTree_Market_Indicators_Rsi { +impl MetricsTree_Market_Technical_Rsi { pub fn new(client: Arc, base_path: String) -> Self { Self { _24h: AverageGainsLossesRsiStochPattern::new(client.clone(), "rsi".to_string()), - _1w: MetricsTree_Market_Indicators_Rsi_1w::new(client.clone(), format!("{base_path}_1w")), - _1m: MetricsTree_Market_Indicators_Rsi_1m::new(client.clone(), format!("{base_path}_1m")), - _1y: MetricsTree_Market_Indicators_Rsi_1y::new(client.clone(), format!("{base_path}_1y")), + _1w: MetricsTree_Market_Technical_Rsi_1w::new(client.clone(), format!("{base_path}_1w")), + _1m: MetricsTree_Market_Technical_Rsi_1m::new(client.clone(), format!("{base_path}_1m")), + _1y: MetricsTree_Market_Technical_Rsi_1y::new(client.clone(), format!("{base_path}_1y")), } } } /// Metrics tree node. -pub struct MetricsTree_Market_Indicators_Rsi_1w { +pub struct MetricsTree_Market_Technical_Rsi_1w { pub gains: MetricPattern1, pub losses: MetricPattern1, pub average_gain: MetricPattern1, @@ -6115,7 +6061,7 @@ pub struct MetricsTree_Market_Indicators_Rsi_1w { pub stoch_rsi_d: BpsPercentRatioPattern, } -impl MetricsTree_Market_Indicators_Rsi_1w { +impl MetricsTree_Market_Technical_Rsi_1w { pub fn new(client: Arc, base_path: String) -> Self { Self { gains: MetricPattern1::new(client.clone(), "rsi_gains_1w".to_string()), @@ -6133,7 +6079,7 @@ impl MetricsTree_Market_Indicators_Rsi_1w { } /// Metrics tree node. -pub struct MetricsTree_Market_Indicators_Rsi_1m { +pub struct MetricsTree_Market_Technical_Rsi_1m { pub gains: MetricPattern1, pub losses: MetricPattern1, pub average_gain: MetricPattern1, @@ -6146,7 +6092,7 @@ pub struct MetricsTree_Market_Indicators_Rsi_1m { pub stoch_rsi_d: BpsPercentRatioPattern, } -impl MetricsTree_Market_Indicators_Rsi_1m { +impl MetricsTree_Market_Technical_Rsi_1m { pub fn new(client: Arc, base_path: String) -> Self { Self { gains: MetricPattern1::new(client.clone(), "rsi_gains_1m".to_string()), @@ -6164,7 +6110,7 @@ impl MetricsTree_Market_Indicators_Rsi_1m { } /// Metrics tree node. -pub struct MetricsTree_Market_Indicators_Rsi_1y { +pub struct MetricsTree_Market_Technical_Rsi_1y { pub gains: MetricPattern1, pub losses: MetricPattern1, pub average_gain: MetricPattern1, @@ -6177,7 +6123,7 @@ pub struct MetricsTree_Market_Indicators_Rsi_1y { pub stoch_rsi_d: BpsPercentRatioPattern, } -impl MetricsTree_Market_Indicators_Rsi_1y { +impl MetricsTree_Market_Technical_Rsi_1y { pub fn new(client: Arc, base_path: String) -> Self { Self { gains: MetricPattern1::new(client.clone(), "rsi_gains_1y".to_string()), @@ -6195,26 +6141,26 @@ impl MetricsTree_Market_Indicators_Rsi_1y { } /// Metrics tree node. -pub struct MetricsTree_Market_Indicators_Macd { +pub struct MetricsTree_Market_Technical_Macd { pub _24h: EmaHistogramLineSignalPattern, - pub _1w: MetricsTree_Market_Indicators_Macd_1w, - pub _1m: MetricsTree_Market_Indicators_Macd_1m, - pub _1y: MetricsTree_Market_Indicators_Macd_1y, + pub _1w: MetricsTree_Market_Technical_Macd_1w, + pub _1m: MetricsTree_Market_Technical_Macd_1m, + pub _1y: MetricsTree_Market_Technical_Macd_1y, } -impl MetricsTree_Market_Indicators_Macd { +impl MetricsTree_Market_Technical_Macd { pub fn new(client: Arc, base_path: String) -> Self { Self { _24h: EmaHistogramLineSignalPattern::new(client.clone(), "macd".to_string()), - _1w: MetricsTree_Market_Indicators_Macd_1w::new(client.clone(), format!("{base_path}_1w")), - _1m: MetricsTree_Market_Indicators_Macd_1m::new(client.clone(), format!("{base_path}_1m")), - _1y: MetricsTree_Market_Indicators_Macd_1y::new(client.clone(), format!("{base_path}_1y")), + _1w: MetricsTree_Market_Technical_Macd_1w::new(client.clone(), format!("{base_path}_1w")), + _1m: MetricsTree_Market_Technical_Macd_1m::new(client.clone(), format!("{base_path}_1m")), + _1y: MetricsTree_Market_Technical_Macd_1y::new(client.clone(), format!("{base_path}_1y")), } } } /// Metrics tree node. -pub struct MetricsTree_Market_Indicators_Macd_1w { +pub struct MetricsTree_Market_Technical_Macd_1w { pub ema_fast: MetricPattern1, pub ema_slow: MetricPattern1, pub line: MetricPattern1, @@ -6222,7 +6168,7 @@ pub struct MetricsTree_Market_Indicators_Macd_1w { pub histogram: MetricPattern1, } -impl MetricsTree_Market_Indicators_Macd_1w { +impl MetricsTree_Market_Technical_Macd_1w { pub fn new(client: Arc, base_path: String) -> Self { Self { ema_fast: MetricPattern1::new(client.clone(), "macd_ema_fast_1w".to_string()), @@ -6235,7 +6181,7 @@ impl MetricsTree_Market_Indicators_Macd_1w { } /// Metrics tree node. -pub struct MetricsTree_Market_Indicators_Macd_1m { +pub struct MetricsTree_Market_Technical_Macd_1m { pub ema_fast: MetricPattern1, pub ema_slow: MetricPattern1, pub line: MetricPattern1, @@ -6243,7 +6189,7 @@ pub struct MetricsTree_Market_Indicators_Macd_1m { pub histogram: MetricPattern1, } -impl MetricsTree_Market_Indicators_Macd_1m { +impl MetricsTree_Market_Technical_Macd_1m { pub fn new(client: Arc, base_path: String) -> Self { Self { ema_fast: MetricPattern1::new(client.clone(), "macd_ema_fast_1m".to_string()), @@ -6256,7 +6202,7 @@ impl MetricsTree_Market_Indicators_Macd_1m { } /// Metrics tree node. -pub struct MetricsTree_Market_Indicators_Macd_1y { +pub struct MetricsTree_Market_Technical_Macd_1y { pub ema_fast: MetricPattern1, pub ema_slow: MetricPattern1, pub line: MetricPattern1, @@ -6264,7 +6210,7 @@ pub struct MetricsTree_Market_Indicators_Macd_1y { pub histogram: MetricPattern1, } -impl MetricsTree_Market_Indicators_Macd_1y { +impl MetricsTree_Market_Technical_Macd_1y { pub fn new(client: Arc, base_path: String) -> Self { Self { ema_fast: MetricPattern1::new(client.clone(), "macd_ema_fast_1y".to_string()), @@ -6733,6 +6679,7 @@ pub struct MetricsTree_Distribution { pub addresses_data: MetricsTree_Distribution_AddressesData, pub utxo_cohorts: MetricsTree_Distribution_UtxoCohorts, pub address_cohorts: MetricsTree_Distribution_AddressCohorts, + pub coinblocks_destroyed: CumulativeRawPattern, pub addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern, pub empty_addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern, pub address_activity: MetricsTree_Distribution_AddressActivity, @@ -6751,6 +6698,7 @@ impl MetricsTree_Distribution { addresses_data: MetricsTree_Distribution_AddressesData::new(client.clone(), format!("{base_path}_addresses_data")), utxo_cohorts: MetricsTree_Distribution_UtxoCohorts::new(client.clone(), format!("{base_path}_utxo_cohorts")), address_cohorts: MetricsTree_Distribution_AddressCohorts::new(client.clone(), format!("{base_path}_address_cohorts")), + coinblocks_destroyed: CumulativeRawPattern::new(client.clone(), "coinblocks_destroyed".to_string()), addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new(client.clone(), "addr_count".to_string()), empty_addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new(client.clone(), "empty_addr_count".to_string()), address_activity: MetricsTree_Distribution_AddressActivity::new(client.clone(), format!("{base_path}_address_activity")), @@ -6846,135 +6794,172 @@ impl MetricsTree_Distribution_UtxoCohorts { /// Metrics tree node. pub struct MetricsTree_Distribution_UtxoCohorts_All { - pub supply: DeltaHalvedTotalPattern2, + pub supply: MetricsTree_Distribution_UtxoCohorts_All_Supply, pub outputs: UtxoPattern3, - pub activity: CoinblocksCoindaysDormancySentVelocityPattern, + pub activity: CoindaysDormancySentVelocityPattern, pub realized: CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern, pub cost_basis: InvestedMaxMinPercentilesPattern, - pub unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern, - pub relative: MetricsTree_Distribution_UtxoCohorts_All_Relative, + pub unrealized: MetricsTree_Distribution_UtxoCohorts_All_Unrealized, } impl MetricsTree_Distribution_UtxoCohorts_All { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: DeltaHalvedTotalPattern2::new(client.clone(), "supply".to_string()), + supply: MetricsTree_Distribution_UtxoCohorts_All_Supply::new(client.clone(), format!("{base_path}_supply")), outputs: UtxoPattern3::new(client.clone(), "utxo_count".to_string()), - activity: CoinblocksCoindaysDormancySentVelocityPattern::new(client.clone(), "".to_string()), + activity: CoindaysDormancySentVelocityPattern::new(client.clone(), "".to_string()), realized: CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern::new(client.clone(), "".to_string()), cost_basis: InvestedMaxMinPercentilesPattern::new(client.clone(), "".to_string()), - unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern::new(client.clone(), "".to_string()), - relative: MetricsTree_Distribution_UtxoCohorts_All_Relative::new(client.clone(), format!("{base_path}_relative")), + unrealized: MetricsTree_Distribution_UtxoCohorts_All_Unrealized::new(client.clone(), format!("{base_path}_unrealized")), } } } /// Metrics tree node. -pub struct MetricsTree_Distribution_UtxoCohorts_All_Relative { - pub supply: MetricsTree_Distribution_UtxoCohorts_All_Relative_Supply, - pub unrealized: MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized, +pub struct MetricsTree_Distribution_UtxoCohorts_All_Supply { + pub delta: ChangeRatePattern2, + pub total: BtcCentsSatsUsdPattern, + pub halved: BtcCentsSatsUsdPattern, } -impl MetricsTree_Distribution_UtxoCohorts_All_Relative { +impl MetricsTree_Distribution_UtxoCohorts_All_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: MetricsTree_Distribution_UtxoCohorts_All_Relative_Supply::new(client.clone(), format!("{base_path}_supply")), - unrealized: MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized::new(client.clone(), format!("{base_path}_unrealized")), + delta: ChangeRatePattern2::new(client.clone(), "supply_delta".to_string()), + total: BtcCentsSatsUsdPattern::new(client.clone(), "supply".to_string()), + halved: BtcCentsSatsUsdPattern::new(client.clone(), "supply_halved".to_string()), } } } /// Metrics tree node. -pub struct MetricsTree_Distribution_UtxoCohorts_All_Relative_Supply { - pub in_profit: RelPattern3, - pub in_loss: RelPattern3, +pub struct MetricsTree_Distribution_UtxoCohorts_All_Unrealized { + pub gross_pnl: CentsUsdPattern, + pub invested_capital: InPattern4, + pub sentiment: GreedNetPainPattern, + pub investor_cap: InPattern2, + pub loss: MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Loss, + pub net_pnl: MetricsTree_Distribution_UtxoCohorts_All_Unrealized_NetPnl, + pub profit: MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Profit, } -impl MetricsTree_Distribution_UtxoCohorts_All_Relative_Supply { +impl MetricsTree_Distribution_UtxoCohorts_All_Unrealized { pub fn new(client: Arc, base_path: String) -> Self { Self { - in_profit: RelPattern3::new(client.clone(), "supply_in_profit_rel_to_own_supply".to_string()), - in_loss: RelPattern3::new(client.clone(), "supply_in_loss_rel_to_own_supply".to_string()), + gross_pnl: CentsUsdPattern::new(client.clone(), "unrealized_gross_pnl".to_string()), + invested_capital: InPattern4::new(client.clone(), "invested_capital_in".to_string()), + sentiment: GreedNetPainPattern::new(client.clone(), "".to_string()), + investor_cap: InPattern2::new(client.clone(), "investor_cap_in".to_string()), + loss: MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Loss::new(client.clone(), format!("{base_path}_loss")), + net_pnl: MetricsTree_Distribution_UtxoCohorts_All_Unrealized_NetPnl::new(client.clone(), format!("{base_path}_net_pnl")), + profit: MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Profit::new(client.clone(), format!("{base_path}_profit")), } } } /// Metrics tree node. -pub struct MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized { - pub profit: RelPattern4, - pub loss: RelPattern4, - pub net_pnl: MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized_NetPnl, -} - -impl MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized { - pub fn new(client: Arc, base_path: String) -> Self { - Self { - profit: RelPattern4::new(client.clone(), "unrealized_profit_rel_to".to_string()), - loss: RelPattern4::new(client.clone(), "unrealized_loss_rel_to".to_string()), - net_pnl: MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized_NetPnl::new(client.clone(), format!("{base_path}_net_pnl")), - } - } -} - -/// Metrics tree node. -pub struct MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized_NetPnl { +pub struct MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Loss { + pub negative: MetricPattern1, + pub raw: CentsUsdPattern, + pub sum: _24hPattern, + pub supply: BtcCentsRelSatsUsdPattern2, + pub rel_to_market_cap: BpsPercentRatioPattern, pub rel_to_own_gross_pnl: BpsPercentRatioPattern, } -impl MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized_NetPnl { +impl MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { + negative: MetricPattern1::new(client.clone(), "neg_unrealized_loss".to_string()), + raw: CentsUsdPattern::new(client.clone(), "unrealized_loss".to_string()), + sum: _24hPattern::new(client.clone(), "unrealized_loss_24h".to_string()), + supply: BtcCentsRelSatsUsdPattern2::new(client.clone(), "supply_in_loss".to_string()), + rel_to_market_cap: BpsPercentRatioPattern::new(client.clone(), "unrealized_loss_rel_to_market_cap".to_string()), + rel_to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), "unrealized_loss_rel_to_own_gross_pnl".to_string()), + } + } +} + +/// Metrics tree node. +pub struct MetricsTree_Distribution_UtxoCohorts_All_Unrealized_NetPnl { + pub cents: MetricPattern1, + pub usd: MetricPattern1, + pub rel_to_own_gross_pnl: BpsPercentRatioPattern, +} + +impl MetricsTree_Distribution_UtxoCohorts_All_Unrealized_NetPnl { + pub fn new(client: Arc, base_path: String) -> Self { + Self { + cents: MetricPattern1::new(client.clone(), "net_unrealized_pnl_cents".to_string()), + usd: MetricPattern1::new(client.clone(), "net_unrealized_pnl".to_string()), rel_to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), "net_unrealized_pnl_rel_to_own_gross_pnl".to_string()), } } } +/// Metrics tree node. +pub struct MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Profit { + pub raw: CentsUsdPattern, + pub sum: _24hPattern, + pub supply: BtcCentsRelSatsUsdPattern2, + pub rel_to_market_cap: BpsPercentRatioPattern, + pub rel_to_own_gross_pnl: BpsPercentRatioPattern, +} + +impl MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Profit { + pub fn new(client: Arc, base_path: String) -> Self { + Self { + raw: CentsUsdPattern::new(client.clone(), "unrealized_profit".to_string()), + sum: _24hPattern::new(client.clone(), "unrealized_profit_24h".to_string()), + supply: BtcCentsRelSatsUsdPattern2::new(client.clone(), "supply_in_profit".to_string()), + rel_to_market_cap: BpsPercentRatioPattern::new(client.clone(), "unrealized_profit_rel_to_market_cap".to_string()), + rel_to_own_gross_pnl: BpsPercentRatioPattern::new(client.clone(), "unrealized_profit_rel_to_own_gross_pnl".to_string()), + } + } +} + /// Metrics tree node. pub struct MetricsTree_Distribution_UtxoCohorts_Sth { pub realized: CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern, - pub supply: DeltaHalvedTotalPattern2, + pub supply: DeltaHalvedRelTotalPattern2, pub outputs: UtxoPattern3, - pub activity: CoinblocksCoindaysDormancySentVelocityPattern, + pub activity: CoindaysDormancySentVelocityPattern, pub cost_basis: InvestedMaxMinPercentilesPattern, - pub unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern, - pub relative: SupplyUnrealizedPattern2, + pub unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern2, } impl MetricsTree_Distribution_UtxoCohorts_Sth { pub fn new(client: Arc, base_path: String) -> Self { Self { realized: CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern::new(client.clone(), "sth".to_string()), - supply: DeltaHalvedTotalPattern2::new(client.clone(), "sth_supply".to_string()), + supply: DeltaHalvedRelTotalPattern2::new(client.clone(), "sth_supply".to_string()), outputs: UtxoPattern3::new(client.clone(), "sth_utxo_count".to_string()), - activity: CoinblocksCoindaysDormancySentVelocityPattern::new(client.clone(), "sth".to_string()), + activity: CoindaysDormancySentVelocityPattern::new(client.clone(), "sth".to_string()), cost_basis: InvestedMaxMinPercentilesPattern::new(client.clone(), "sth".to_string()), - unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern::new(client.clone(), "sth".to_string()), - relative: SupplyUnrealizedPattern2::new(client.clone(), "sth".to_string()), + unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern2::new(client.clone(), "sth".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Distribution_UtxoCohorts_Lth { - pub supply: DeltaHalvedTotalPattern2, + pub supply: DeltaHalvedRelTotalPattern2, pub outputs: UtxoPattern3, - pub activity: CoinblocksCoindaysDormancySentVelocityPattern, + pub activity: CoindaysDormancySentVelocityPattern, pub realized: MetricsTree_Distribution_UtxoCohorts_Lth_Realized, pub cost_basis: InvestedMaxMinPercentilesPattern, - pub unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern, - pub relative: SupplyUnrealizedPattern2, + pub unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern2, } impl MetricsTree_Distribution_UtxoCohorts_Lth { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: DeltaHalvedTotalPattern2::new(client.clone(), "lth_supply".to_string()), + supply: DeltaHalvedRelTotalPattern2::new(client.clone(), "lth_supply".to_string()), outputs: UtxoPattern3::new(client.clone(), "lth_utxo_count".to_string()), - activity: CoinblocksCoindaysDormancySentVelocityPattern::new(client.clone(), "lth".to_string()), + activity: CoindaysDormancySentVelocityPattern::new(client.clone(), "lth".to_string()), realized: MetricsTree_Distribution_UtxoCohorts_Lth_Realized::new(client.clone(), format!("{base_path}_realized")), cost_basis: InvestedMaxMinPercentilesPattern::new(client.clone(), "lth".to_string()), - unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern::new(client.clone(), "lth".to_string()), - relative: SupplyUnrealizedPattern2::new(client.clone(), "lth".to_string()), + unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern2::new(client.clone(), "lth".to_string()), } } } @@ -6987,7 +6972,7 @@ pub struct MetricsTree_Distribution_UtxoCohorts_Lth_Realized { pub net_pnl: ChangeCumulativeDeltaRawRelSumPattern, pub sopr: MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr, pub sent: InPattern3, - pub peak_regret: CumulativeHeightRelPattern, + pub peak_regret: CumulativeRawRelPattern, pub investor: CapLowerPriceUpperPattern, pub profit_to_loss_ratio: _1m1w1y24hPattern, pub cap: CentsDeltaRawRelUsdPattern, @@ -7006,7 +6991,7 @@ impl MetricsTree_Distribution_UtxoCohorts_Lth_Realized { net_pnl: ChangeCumulativeDeltaRawRelSumPattern::new(client.clone(), "lth_net".to_string()), sopr: MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr::new(client.clone(), format!("{base_path}_sopr")), sent: InPattern3::new(client.clone(), "lth_sent_in".to_string()), - peak_regret: CumulativeHeightRelPattern::new(client.clone(), "lth_realized_peak_regret".to_string()), + peak_regret: CumulativeRawRelPattern::new(client.clone(), "lth_realized_peak_regret".to_string()), investor: CapLowerPriceUpperPattern::new(client.clone(), "lth".to_string()), profit_to_loss_ratio: _1m1w1y24hPattern::new(client.clone(), "lth_realized_profit_to_loss_ratio".to_string()), cap: CentsDeltaRawRelUsdPattern::new(client.clone(), "lth".to_string()), @@ -7020,232 +7005,262 @@ impl MetricsTree_Distribution_UtxoCohorts_Lth_Realized { /// Metrics tree node. pub struct MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr { - pub value_created: RawSumPattern3, - pub value_destroyed: RawSumPattern3, + pub value_created: MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueCreated, + pub value_destroyed: MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueDestroyed, pub ratio: _1m1w1y24hPattern, } impl MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr { pub fn new(client: Arc, base_path: String) -> Self { Self { - value_created: RawSumPattern3::new(client.clone(), "lth_value_created".to_string()), - value_destroyed: RawSumPattern3::new(client.clone(), "lth_value_destroyed".to_string()), + value_created: MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueCreated::new(client.clone(), format!("{base_path}_value_created")), + value_destroyed: MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueDestroyed::new(client.clone(), format!("{base_path}_value_destroyed")), ratio: _1m1w1y24hPattern::new(client.clone(), "lth_sopr".to_string()), } } } +/// Metrics tree node. +pub struct MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueCreated { + pub sum: _1m1w1y24hPattern, + pub raw: MetricPattern1, +} + +impl MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueCreated { + pub fn new(client: Arc, base_path: String) -> Self { + Self { + sum: _1m1w1y24hPattern::new(client.clone(), "lth_value_created".to_string()), + raw: MetricPattern1::new(client.clone(), "lth_value_created".to_string()), + } + } +} + +/// Metrics tree node. +pub struct MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueDestroyed { + pub sum: _1m1w1y24hPattern, + pub raw: MetricPattern1, +} + +impl MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueDestroyed { + pub fn new(client: Arc, base_path: String) -> Self { + Self { + sum: _1m1w1y24hPattern::new(client.clone(), "lth_value_destroyed".to_string()), + raw: MetricPattern1::new(client.clone(), "lth_value_destroyed".to_string()), + } + } +} + /// Metrics tree node. pub struct MetricsTree_Distribution_UtxoCohorts_AgeRange { - pub up_to_1h: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _1h_to_1d: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _1d_to_1w: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _1w_to_1m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _1m_to_2m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _2m_to_3m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _3m_to_4m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _4m_to_5m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _5m_to_6m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _6m_to_1y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _1y_to_2y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _2y_to_3y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _3y_to_4y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _4y_to_5y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _5y_to_6y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _6y_to_7y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _7y_to_8y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _8y_to_10y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _10y_to_12y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub _12y_to_15y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, - pub from_15y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern, + pub up_to_1h: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _1h_to_1d: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _1d_to_1w: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _1w_to_1m: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _1m_to_2m: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _2m_to_3m: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _3m_to_4m: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _4m_to_5m: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _5m_to_6m: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _6m_to_1y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _1y_to_2y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _2y_to_3y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _3y_to_4y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _4y_to_5y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _5y_to_6y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _6y_to_7y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _7y_to_8y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _8y_to_10y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _10y_to_12y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub _12y_to_15y: ActivityOutputsRealizedSupplyUnrealizedPattern, + pub from_15y: ActivityOutputsRealizedSupplyUnrealizedPattern, } impl MetricsTree_Distribution_UtxoCohorts_AgeRange { pub fn new(client: Arc, base_path: String) -> Self { Self { - up_to_1h: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_under_1h_old".to_string()), - _1h_to_1d: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_1h_to_1d_old".to_string()), - _1d_to_1w: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_1d_to_1w_old".to_string()), - _1w_to_1m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_1w_to_1m_old".to_string()), - _1m_to_2m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_1m_to_2m_old".to_string()), - _2m_to_3m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_2m_to_3m_old".to_string()), - _3m_to_4m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_3m_to_4m_old".to_string()), - _4m_to_5m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_4m_to_5m_old".to_string()), - _5m_to_6m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_5m_to_6m_old".to_string()), - _6m_to_1y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_6m_to_1y_old".to_string()), - _1y_to_2y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_1y_to_2y_old".to_string()), - _2y_to_3y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_2y_to_3y_old".to_string()), - _3y_to_4y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_3y_to_4y_old".to_string()), - _4y_to_5y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_4y_to_5y_old".to_string()), - _5y_to_6y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_5y_to_6y_old".to_string()), - _6y_to_7y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_6y_to_7y_old".to_string()), - _7y_to_8y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_7y_to_8y_old".to_string()), - _8y_to_10y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_8y_to_10y_old".to_string()), - _10y_to_12y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_10y_to_12y_old".to_string()), - _12y_to_15y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_12y_to_15y_old".to_string()), - from_15y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern::new(client.clone(), "utxos_over_15y_old".to_string()), + up_to_1h: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_under_1h_old".to_string()), + _1h_to_1d: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_1h_to_1d_old".to_string()), + _1d_to_1w: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_1d_to_1w_old".to_string()), + _1w_to_1m: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_1w_to_1m_old".to_string()), + _1m_to_2m: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_1m_to_2m_old".to_string()), + _2m_to_3m: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_2m_to_3m_old".to_string()), + _3m_to_4m: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_3m_to_4m_old".to_string()), + _4m_to_5m: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_4m_to_5m_old".to_string()), + _5m_to_6m: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_5m_to_6m_old".to_string()), + _6m_to_1y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_6m_to_1y_old".to_string()), + _1y_to_2y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_1y_to_2y_old".to_string()), + _2y_to_3y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_2y_to_3y_old".to_string()), + _3y_to_4y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_3y_to_4y_old".to_string()), + _4y_to_5y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_4y_to_5y_old".to_string()), + _5y_to_6y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_5y_to_6y_old".to_string()), + _6y_to_7y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_6y_to_7y_old".to_string()), + _7y_to_8y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_7y_to_8y_old".to_string()), + _8y_to_10y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_8y_to_10y_old".to_string()), + _10y_to_12y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_10y_to_12y_old".to_string()), + _12y_to_15y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_12y_to_15y_old".to_string()), + from_15y: ActivityOutputsRealizedSupplyUnrealizedPattern::new(client.clone(), "utxos_over_15y_old".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Distribution_UtxoCohorts_MaxAge { - pub _1w: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _1m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _3m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _4m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _5m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _6m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _1y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _3y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _4y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _5y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _6y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _7y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _8y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _10y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _12y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _15y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, + pub _1w: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _1m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _3m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _4m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _5m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _6m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _1y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _3y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _4y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _5y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _6y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _7y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _8y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _10y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _12y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _15y: ActivityOutputsRealizedSupplyUnrealizedPattern2, } impl MetricsTree_Distribution_UtxoCohorts_MaxAge { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_1w_old".to_string()), - _1m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_1m_old".to_string()), - _2m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_2m_old".to_string()), - _3m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_3m_old".to_string()), - _4m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_4m_old".to_string()), - _5m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_5m_old".to_string()), - _6m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_6m_old".to_string()), - _1y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_1y_old".to_string()), - _2y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_2y_old".to_string()), - _3y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_3y_old".to_string()), - _4y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_4y_old".to_string()), - _5y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_5y_old".to_string()), - _6y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_6y_old".to_string()), - _7y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_7y_old".to_string()), - _8y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_8y_old".to_string()), - _10y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_10y_old".to_string()), - _12y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_12y_old".to_string()), - _15y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_15y_old".to_string()), + _1w: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_1w_old".to_string()), + _1m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_1m_old".to_string()), + _2m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_2m_old".to_string()), + _3m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_3m_old".to_string()), + _4m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_4m_old".to_string()), + _5m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_5m_old".to_string()), + _6m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_6m_old".to_string()), + _1y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_1y_old".to_string()), + _2y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_2y_old".to_string()), + _3y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_3y_old".to_string()), + _4y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_4y_old".to_string()), + _5y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_5y_old".to_string()), + _6y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_6y_old".to_string()), + _7y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_7y_old".to_string()), + _8y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_8y_old".to_string()), + _10y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_10y_old".to_string()), + _12y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_12y_old".to_string()), + _15y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_under_15y_old".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Distribution_UtxoCohorts_MinAge { - pub _1d: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _1w: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _1m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _3m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _4m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _5m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _6m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _1y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _3y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _4y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _5y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _6y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _7y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _8y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _10y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _12y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, + pub _1d: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _1w: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _1m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _3m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _4m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _5m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _6m: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _1y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _3y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _4y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _5y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _6y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _7y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _8y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _10y: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _12y: ActivityOutputsRealizedSupplyUnrealizedPattern2, } impl MetricsTree_Distribution_UtxoCohorts_MinAge { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_1d_old".to_string()), - _1w: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_1w_old".to_string()), - _1m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_1m_old".to_string()), - _2m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_2m_old".to_string()), - _3m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_3m_old".to_string()), - _4m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_4m_old".to_string()), - _5m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_5m_old".to_string()), - _6m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_6m_old".to_string()), - _1y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_1y_old".to_string()), - _2y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_2y_old".to_string()), - _3y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_3y_old".to_string()), - _4y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_4y_old".to_string()), - _5y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_5y_old".to_string()), - _6y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_6y_old".to_string()), - _7y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_7y_old".to_string()), - _8y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_8y_old".to_string()), - _10y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_10y_old".to_string()), - _12y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_12y_old".to_string()), + _1d: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_1d_old".to_string()), + _1w: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_1w_old".to_string()), + _1m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_1m_old".to_string()), + _2m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_2m_old".to_string()), + _3m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_3m_old".to_string()), + _4m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_4m_old".to_string()), + _5m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_5m_old".to_string()), + _6m: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_6m_old".to_string()), + _1y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_1y_old".to_string()), + _2y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_2y_old".to_string()), + _3y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_3y_old".to_string()), + _4y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_4y_old".to_string()), + _5y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_5y_old".to_string()), + _6y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_6y_old".to_string()), + _7y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_7y_old".to_string()), + _8y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_8y_old".to_string()), + _10y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_10y_old".to_string()), + _12y: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "utxos_over_12y_old".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Distribution_UtxoCohorts_Epoch { - pub _0: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _1: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _3: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _4: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, + pub _0: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _1: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _3: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _4: ActivityOutputsRealizedSupplyUnrealizedPattern2, } impl MetricsTree_Distribution_UtxoCohorts_Epoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "epoch_0".to_string()), - _1: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "epoch_1".to_string()), - _2: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "epoch_2".to_string()), - _3: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "epoch_3".to_string()), - _4: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "epoch_4".to_string()), + _0: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "epoch_0".to_string()), + _1: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "epoch_1".to_string()), + _2: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "epoch_2".to_string()), + _3: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "epoch_3".to_string()), + _4: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "epoch_4".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Distribution_UtxoCohorts_Class { - pub _2009: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2010: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2011: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2012: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2013: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2014: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2015: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2016: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2017: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2018: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2019: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2020: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2021: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2022: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2023: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2024: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2025: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, - pub _2026: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2, + pub _2009: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2010: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2011: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2012: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2013: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2014: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2015: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2016: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2017: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2018: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2019: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2020: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2021: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2022: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2023: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2024: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2025: ActivityOutputsRealizedSupplyUnrealizedPattern2, + pub _2026: ActivityOutputsRealizedSupplyUnrealizedPattern2, } impl MetricsTree_Distribution_UtxoCohorts_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2009".to_string()), - _2010: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2010".to_string()), - _2011: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2011".to_string()), - _2012: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2012".to_string()), - _2013: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2013".to_string()), - _2014: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2014".to_string()), - _2015: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2015".to_string()), - _2016: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2016".to_string()), - _2017: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2017".to_string()), - _2018: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2018".to_string()), - _2019: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2019".to_string()), - _2020: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2020".to_string()), - _2021: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2021".to_string()), - _2022: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2022".to_string()), - _2023: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2023".to_string()), - _2024: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2024".to_string()), - _2025: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2025".to_string()), - _2026: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2::new(client.clone(), "class_2026".to_string()), + _2009: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2009".to_string()), + _2010: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2010".to_string()), + _2011: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2011".to_string()), + _2012: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2012".to_string()), + _2013: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2013".to_string()), + _2014: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2014".to_string()), + _2015: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2015".to_string()), + _2016: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2016".to_string()), + _2017: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2017".to_string()), + _2018: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2018".to_string()), + _2019: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2019".to_string()), + _2020: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2020".to_string()), + _2021: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2021".to_string()), + _2022: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2022".to_string()), + _2023: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2023".to_string()), + _2024: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2024".to_string()), + _2025: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2025".to_string()), + _2026: ActivityOutputsRealizedSupplyUnrealizedPattern2::new(client.clone(), "class_2026".to_string()), } } } @@ -7764,29 +7779,29 @@ impl MetricsTree_Distribution_AddressActivity { /// Metrics tree node. pub struct MetricsTree_Distribution_NewAddrCount { - pub all: HeightSumPattern, - pub p2pk65: HeightSumPattern, - pub p2pk33: HeightSumPattern, - pub p2pkh: HeightSumPattern, - pub p2sh: HeightSumPattern, - pub p2wpkh: HeightSumPattern, - pub p2wsh: HeightSumPattern, - pub p2tr: HeightSumPattern, - pub p2a: HeightSumPattern, + pub all: RawSumPattern3, + pub p2pk65: RawSumPattern3, + pub p2pk33: RawSumPattern3, + pub p2pkh: RawSumPattern3, + pub p2sh: RawSumPattern3, + pub p2wpkh: RawSumPattern3, + pub p2wsh: RawSumPattern3, + pub p2tr: RawSumPattern3, + pub p2a: RawSumPattern3, } impl MetricsTree_Distribution_NewAddrCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: HeightSumPattern::new(client.clone(), "new_addr_count".to_string()), - p2pk65: HeightSumPattern::new(client.clone(), "p2pk65_new_addr_count".to_string()), - p2pk33: HeightSumPattern::new(client.clone(), "p2pk33_new_addr_count".to_string()), - p2pkh: HeightSumPattern::new(client.clone(), "p2pkh_new_addr_count".to_string()), - p2sh: HeightSumPattern::new(client.clone(), "p2sh_new_addr_count".to_string()), - p2wpkh: HeightSumPattern::new(client.clone(), "p2wpkh_new_addr_count".to_string()), - p2wsh: HeightSumPattern::new(client.clone(), "p2wsh_new_addr_count".to_string()), - p2tr: HeightSumPattern::new(client.clone(), "p2tr_new_addr_count".to_string()), - p2a: HeightSumPattern::new(client.clone(), "p2a_new_addr_count".to_string()), + all: RawSumPattern3::new(client.clone(), "new_addr_count".to_string()), + p2pk65: RawSumPattern3::new(client.clone(), "p2pk65_new_addr_count".to_string()), + p2pk33: RawSumPattern3::new(client.clone(), "p2pk33_new_addr_count".to_string()), + p2pkh: RawSumPattern3::new(client.clone(), "p2pkh_new_addr_count".to_string()), + p2sh: RawSumPattern3::new(client.clone(), "p2sh_new_addr_count".to_string()), + p2wpkh: RawSumPattern3::new(client.clone(), "p2wpkh_new_addr_count".to_string()), + p2wsh: RawSumPattern3::new(client.clone(), "p2wsh_new_addr_count".to_string()), + p2tr: RawSumPattern3::new(client.clone(), "p2tr_new_addr_count".to_string()), + p2a: RawSumPattern3::new(client.clone(), "p2a_new_addr_count".to_string()), } } } @@ -7829,6 +7844,7 @@ pub struct MetricsTree_Supply { pub market_cap: CentsUsdPattern, pub market_cap_delta: ChangeRatePattern4, pub market_minus_realized_cap_growth_rate: _1m1w1y24hPattern, + pub hodled_or_lost_coins: BtcCentsSatsUsdPattern, } impl MetricsTree_Supply { @@ -7841,6 +7857,7 @@ impl MetricsTree_Supply { market_cap: CentsUsdPattern::new(client.clone(), "market_cap".to_string()), market_cap_delta: ChangeRatePattern4::new(client.clone(), "market_cap_delta".to_string()), market_minus_realized_cap_growth_rate: _1m1w1y24hPattern::new(client.clone(), "market_minus_realized_cap_growth_rate".to_string()), + hodled_or_lost_coins: BtcCentsSatsUsdPattern::new(client.clone(), "hodled_or_lost_coins".to_string()), } } } diff --git a/crates/brk_computer/src/distribution/state/cohort/base.rs b/crates/brk_computer/src/distribution/state/cohort/base.rs index ee550acd2..2636e4097 100644 --- a/crates/brk_computer/src/distribution/state/cohort/base.rs +++ b/crates/brk_computer/src/distribution/state/cohort/base.rs @@ -100,8 +100,10 @@ impl CohortState { } pub(crate) fn reset_single_iteration_values(&mut self) { - self.sent = Sats::ZERO; - self.satdays_destroyed = Sats::ZERO; + if R::TRACK_ACTIVITY { + self.sent = Sats::ZERO; + self.satdays_destroyed = Sats::ZERO; + } self.realized.reset_single_iteration_values(); } @@ -198,8 +200,10 @@ impl CohortState { pre: &SendPrecomputed, ) { self.supply -= supply; - self.sent += pre.sats; - self.satdays_destroyed += pre.age.satdays_destroyed(pre.sats); + if R::TRACK_ACTIVITY { + self.sent += pre.sats; + self.satdays_destroyed += pre.age.satdays_destroyed(pre.sats); + } self.realized .send(pre.sats, pre.current_ps, pre.prev_ps, pre.ath_ps, pre.prev_investor_cap); @@ -241,8 +245,10 @@ impl CohortState { self.supply -= supply; if supply.value > Sats::ZERO { - self.sent += supply.value; - self.satdays_destroyed += age.satdays_destroyed(supply.value); + if R::TRACK_ACTIVITY { + self.sent += supply.value; + self.satdays_destroyed += age.satdays_destroyed(supply.value); + } let sats = supply.value; diff --git a/crates/brk_computer/src/distribution/state/cost_basis/realized.rs b/crates/brk_computer/src/distribution/state/cost_basis/realized.rs index 4c0a93882..0ba846f31 100644 --- a/crates/brk_computer/src/distribution/state/cost_basis/realized.rs +++ b/crates/brk_computer/src/distribution/state/cost_basis/realized.rs @@ -4,6 +4,7 @@ use brk_types::{Cents, CentsSats, CentsSquaredSats, Sats}; /// Trait for realized state operations, implemented by Minimal, Core, and Full variants. pub trait RealizedOps: Default + Clone + Send + Sync + 'static { + const TRACK_ACTIVITY: bool = false; fn cap(&self) -> Cents; fn profit(&self) -> Cents; fn loss(&self) -> Cents; @@ -159,6 +160,8 @@ pub struct CoreRealizedState { } impl RealizedOps for CoreRealizedState { + const TRACK_ACTIVITY: bool = true; + #[inline] fn cap(&self) -> Cents { self.minimal.cap() @@ -273,6 +276,8 @@ pub struct RealizedState { } impl RealizedOps for RealizedState { + const TRACK_ACTIVITY: bool = true; + #[inline] fn cap(&self) -> Cents { self.core.cap() diff --git a/crates/brk_computer/src/internal/per_block/amount/lazy.rs b/crates/brk_computer/src/internal/per_block/amount/lazy.rs index 5bc904cb9..484954977 100644 --- a/crates/brk_computer/src/internal/per_block/amount/lazy.rs +++ b/crates/brk_computer/src/internal/per_block/amount/lazy.rs @@ -5,7 +5,7 @@ use brk_types::{Bitcoin, Cents, Dollars, Height, Sats, Version}; use derive_more::{Deref, DerefMut}; use vecdb::UnaryTransform; -use crate::internal::{AmountPerBlock, LazyAmount, LazyAmountDerivedResolutions}; +use crate::internal::{AmountPerBlock, Identity, LazyAmount, LazyAmountDerivedResolutions, SatsToBitcoin}; /// Lazy value wrapper with height + all derived last transforms from AmountPerBlock. #[derive(Clone, Deref, DerefMut, Traversable)] @@ -55,4 +55,10 @@ impl LazyAmountPerBlock { resolutions: Box::new(resolutions), } } + + pub(crate) fn identity(name: &str, source: &AmountPerBlock, version: Version) -> Self { + Self::from_block_source::, SatsToBitcoin, Identity, Identity>( + name, source, version, + ) + } } diff --git a/crates/brk_computer/src/internal/per_block/percent/windows.rs b/crates/brk_computer/src/internal/per_block/percent/windows.rs index 40d236830..2c9dd68e9 100644 --- a/crates/brk_computer/src/internal/per_block/percent/windows.rs +++ b/crates/brk_computer/src/internal/per_block/percent/windows.rs @@ -1,8 +1,8 @@ use brk_error::Result; use brk_traversable::Traversable; -use brk_types::Version; +use brk_types::{Height, Version}; use derive_more::{Deref, DerefMut}; -use vecdb::{Database, Rw, StorageMode}; +use vecdb::{BinaryTransform, Database, Exit, ReadableVec, Rw, StorageMode, VecValue}; use crate::{ indexes, @@ -28,4 +28,30 @@ impl PercentRollingWindows { PercentPerBlock::forced_import(db, &format!("{name}_{suffix}"), version, indexes) })?)) } + + pub(crate) fn compute_binary( + &mut self, + max_from: Height, + sources1: [&R1; 4], + sources2: [&R2; 4], + exit: &Exit, + ) -> Result<()> + where + S1T: VecValue, + S2T: VecValue, + R1: ReadableVec, + R2: ReadableVec, + F: BinaryTransform, + { + for ((target, s1), s2) in self + .0 + .as_mut_array() + .into_iter() + .zip(sources1) + .zip(sources2) + { + target.compute_binary::(max_from, s1, s2, exit)?; + } + Ok(()) + } } diff --git a/crates/brk_computer/src/internal/per_block/ratio/mod.rs b/crates/brk_computer/src/internal/per_block/ratio/mod.rs index 0a97bc602..d029ff60a 100644 --- a/crates/brk_computer/src/internal/per_block/ratio/mod.rs +++ b/crates/brk_computer/src/internal/per_block/ratio/mod.rs @@ -3,9 +3,11 @@ mod extended; mod percentiles; mod price_extended; mod std_dev_bands; +mod windows; pub use base::*; pub use extended::*; pub use percentiles::*; pub use price_extended::*; pub use std_dev_bands::*; +pub use windows::*; diff --git a/crates/brk_computer/src/internal/per_block/ratio/windows.rs b/crates/brk_computer/src/internal/per_block/ratio/windows.rs new file mode 100644 index 000000000..170904b84 --- /dev/null +++ b/crates/brk_computer/src/internal/per_block/ratio/windows.rs @@ -0,0 +1,57 @@ +use brk_error::Result; +use brk_traversable::Traversable; +use brk_types::{Height, Version}; +use derive_more::{Deref, DerefMut}; +use vecdb::{BinaryTransform, Database, Exit, ReadableVec, Rw, StorageMode, VecValue}; + +use crate::{ + indexes, + internal::{BpsType, RatioPerBlock, Windows}, +}; + +/// 4 rolling window vecs (24h, 1w, 1m, 1y), each storing basis points +/// with a lazy ratio float view. +#[derive(Deref, DerefMut, Traversable)] +#[traversable(transparent)] +pub struct RatioRollingWindows( + pub Windows>, +); + +impl RatioRollingWindows { + pub(crate) fn forced_import( + db: &Database, + name: &str, + version: Version, + indexes: &indexes::Vecs, + ) -> Result { + Ok(Self(Windows::try_from_fn(|suffix| { + RatioPerBlock::forced_import_raw(db, &format!("{name}_{suffix}"), version, indexes) + })?)) + } + + pub(crate) fn compute_binary( + &mut self, + max_from: Height, + sources1: [&R1; 4], + sources2: [&R2; 4], + exit: &Exit, + ) -> Result<()> + where + S1T: VecValue, + S2T: VecValue, + R1: ReadableVec, + R2: ReadableVec, + F: BinaryTransform, + { + for ((target, s1), s2) in self + .0 + .as_mut_array() + .into_iter() + .zip(sources1) + .zip(sources2) + { + target.bps.compute_binary::(max_from, s1, s2, exit)?; + } + Ok(()) + } +} diff --git a/crates/brk_computer/src/lib.rs b/crates/brk_computer/src/lib.rs index 1f19626a4..b9b16dcd5 100644 --- a/crates/brk_computer/src/lib.rs +++ b/crates/brk_computer/src/lib.rs @@ -215,6 +215,7 @@ impl Computer { VERSION, &indexes, &distribution, + &cointime, )?)) })?; diff --git a/crates/brk_computer/src/mining/rewards/compute.rs b/crates/brk_computer/src/mining/rewards/compute.rs index 9255c53d9..10c8e533a 100644 --- a/crates/brk_computer/src/mining/rewards/compute.rs +++ b/crates/brk_computer/src/mining/rewards/compute.rs @@ -1,10 +1,10 @@ use brk_error::Result; use brk_indexer::Indexer; -use brk_types::{BasisPoints16, CheckedSub, Halving, Indexes, Sats}; +use brk_types::{BasisPoints16, CheckedSub, Dollars, Halving, Indexes, Sats}; use vecdb::{Exit, ReadableVec, VecIndex}; use super::Vecs; -use crate::{blocks, indexes, internal::RatioSatsBp16, prices, transactions}; +use crate::{blocks, indexes, internal::{RatioDollarsBp32, RatioSatsBp16}, prices, transactions}; impl Vecs { #[allow(clippy::too_many_arguments)] @@ -122,20 +122,13 @@ impl Vecs { )?; // Rolling fee dominance = sum(fees) / sum(coinbase) - for ((fee_dom, fees_w), coinbase_w) in self - .fee_dominance_rolling - .as_mut_array() - .into_iter() - .zip(self.fees.rolling.as_array()) - .zip(self.coinbase.sum.as_array()) - { - fee_dom.compute_binary::( + self.fee_dominance_rolling + .compute_binary::( starting_indexes.height, - &fees_w.sum.sats.height, - &coinbase_w.sats.height, + self.fees.rolling.as_array().map(|w| &w.sum.sats.height), + self.coinbase.sum.as_array().map(|w| &w.sats.height), exit, )?; - } // All-time cumulative subsidy dominance self.subsidy_dominance @@ -168,6 +161,15 @@ impl Vecs { exit, )?; + // Fee Ratio Multiple: sum(coinbase) / sum(fees) per rolling window + self.fee_ratio_multiple + .compute_binary::( + starting_indexes.height, + self.coinbase.sum.as_array().map(|w| &w.usd.height), + self.fees.rolling.as_array().map(|w| &w.sum.usd.height), + exit, + )?; + Ok(()) } } diff --git a/crates/brk_computer/src/mining/rewards/import.rs b/crates/brk_computer/src/mining/rewards/import.rs index 376cd52f7..6b2d3737c 100644 --- a/crates/brk_computer/src/mining/rewards/import.rs +++ b/crates/brk_computer/src/mining/rewards/import.rs @@ -7,7 +7,7 @@ use crate::{ indexes, internal::{ AmountPerBlockCumulative, AmountPerBlockCumulativeSum, AmountPerBlockFull, - FiatPerBlock, PercentPerBlock, PercentRollingWindows, + FiatPerBlock, PercentPerBlock, PercentRollingWindows, RatioRollingWindows, }, }; @@ -49,6 +49,12 @@ impl Vecs { indexes, )?, subsidy_sma_1y: FiatPerBlock::forced_import(db, "subsidy_sma_1y", version, indexes)?, + fee_ratio_multiple: RatioRollingWindows::forced_import( + db, + "fee_ratio_multiple", + version, + indexes, + )?, }) } } diff --git a/crates/brk_computer/src/mining/rewards/vecs.rs b/crates/brk_computer/src/mining/rewards/vecs.rs index 1b6c61049..53338342f 100644 --- a/crates/brk_computer/src/mining/rewards/vecs.rs +++ b/crates/brk_computer/src/mining/rewards/vecs.rs @@ -1,10 +1,10 @@ use brk_traversable::Traversable; -use brk_types::{BasisPoints16, Cents}; +use brk_types::{BasisPoints16, BasisPoints32, Cents}; use vecdb::{Rw, StorageMode}; use crate::internal::{ AmountPerBlockCumulative, AmountPerBlockCumulativeSum, AmountPerBlockFull, - FiatPerBlock, PercentPerBlock, PercentRollingWindows, + FiatPerBlock, PercentPerBlock, PercentRollingWindows, RatioRollingWindows, }; #[derive(Traversable)] @@ -20,4 +20,5 @@ pub struct Vecs { #[traversable(rename = "subsidy_dominance")] pub subsidy_dominance_rolling: PercentRollingWindows, pub subsidy_sma_1y: FiatPerBlock, + pub fee_ratio_multiple: RatioRollingWindows, } diff --git a/crates/brk_computer/src/supply/import.rs b/crates/brk_computer/src/supply/import.rs index c7148f740..c38f60e9c 100644 --- a/crates/brk_computer/src/supply/import.rs +++ b/crates/brk_computer/src/supply/import.rs @@ -1,13 +1,13 @@ use std::path::Path; use brk_error::Result; -use brk_types::{Cents, Dollars, Sats, Version}; +use brk_types::Version; use crate::{ - distribution, indexes, + cointime, distribution, indexes, internal::{ - FiatRollingDelta, Identity, LazyFiatPerBlock, LazyAmountPerBlock, PercentPerBlock, - RollingWindows, SatsToBitcoin, finalize_db, open_db, + FiatRollingDelta, LazyFiatPerBlock, LazyAmountPerBlock, PercentPerBlock, + RollingWindows, finalize_db, open_db, }, }; @@ -21,6 +21,7 @@ impl Vecs { parent_version: Version, indexes: &indexes::Vecs, distribution: &distribution::Vecs, + cointime: &cointime::Vecs, ) -> Result { let db = open_db(parent, super::DB_NAME, 10_000_000)?; @@ -28,12 +29,8 @@ impl Vecs { let supply_metrics = &distribution.utxo_cohorts.all.metrics.supply; // Circulating supply - lazy refs to distribution - let circulating = LazyAmountPerBlock::from_block_source::< - Identity, - SatsToBitcoin, - Identity, - Identity, - >("circulating_supply", &supply_metrics.total, version); + let circulating = + LazyAmountPerBlock::identity("circulating_supply", &supply_metrics.total, version); // Burned/unspendable supply - computed from scripts let burned = super::burned::Vecs::forced_import(&db, version, indexes)?; @@ -64,6 +61,12 @@ impl Vecs { indexes, )?; + let hodled_or_lost_coins = LazyAmountPerBlock::identity( + "hodled_or_lost_coins", + &cointime.supply.vaulted_supply, + version, + ); + let this = Self { db, circulating, @@ -73,6 +76,7 @@ impl Vecs { market_cap, market_cap_delta, market_minus_realized_cap_growth_rate, + hodled_or_lost_coins, }; finalize_db(&this.db, &this)?; Ok(this) diff --git a/crates/brk_computer/src/supply/vecs.rs b/crates/brk_computer/src/supply/vecs.rs index e5d077046..a2698a241 100644 --- a/crates/brk_computer/src/supply/vecs.rs +++ b/crates/brk_computer/src/supply/vecs.rs @@ -19,4 +19,5 @@ pub struct Vecs { pub market_cap: LazyFiatPerBlock, pub market_cap_delta: FiatRollingDelta, pub market_minus_realized_cap_growth_rate: RollingWindows, + pub hodled_or_lost_coins: LazyAmountPerBlock, } diff --git a/crates/brk_query/src/impl/mining/reward_stats.rs b/crates/brk_query/src/impl/mining/reward_stats.rs index c53d8d718..aa9019536 100644 --- a/crates/brk_query/src/impl/mining/reward_stats.rs +++ b/crates/brk_query/src/impl/mining/reward_stats.rs @@ -14,7 +14,7 @@ impl Query { let coinbase_vec = &computer.mining.rewards.coinbase.base.sats.height; let fee_vec = &computer.mining.rewards.fees.base.sats.height; - let tx_count_vec = &computer.transactions.count.tx_count.height; + let tx_count_vec = &computer.transactions.count.tx_count.raw.height; let start = start_block.to_usize(); let end = end_block.to_usize() + 1; diff --git a/modules/brk-client/index.js b/modules/brk-client/index.js index bc05f5233..0e1dc8961 100644 --- a/modules/brk-client/index.js +++ b/modules/brk-client/index.js @@ -1702,7 +1702,7 @@ function create_0sdM0M1M1sdM2M2sdM3sdP0P1P1sdP2P2sdP3sdSdSmaZscorePattern(client * @property {MetricPattern1} mvrv * @property {ChangeCumulativeDeltaRawRelSumPattern} netPnl * @property {BpsRatioPattern} nupl - * @property {CumulativeHeightRelPattern} peakRegret + * @property {CumulativeRawRelPattern} peakRegret * @property {CentsSatsUsdPattern} price * @property {BpsPercentilesRatioStdPattern} priceRatio * @property {CumulativeDistributionRawRelSumValuePattern} profit @@ -1726,7 +1726,7 @@ function createCapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern(cli mvrv: createMetricPattern1(client, _m(acc, 'mvrv')), netPnl: createChangeCumulativeDeltaRawRelSumPattern(client, _m(acc, 'net')), nupl: createBpsRatioPattern(client, _m(acc, 'nupl_ratio')), - peakRegret: createCumulativeHeightRelPattern(client, _m(acc, 'realized_peak_regret')), + peakRegret: createCumulativeRawRelPattern(client, _m(acc, 'realized_peak_regret')), price: createCentsSatsUsdPattern(client, _m(acc, 'realized_price')), priceRatio: createBpsPercentilesRatioStdPattern(client, _m(acc, 'realized_price_ratio')), profit: createCumulativeDistributionRawRelSumValuePattern(client, acc), @@ -1852,10 +1852,9 @@ function createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPatter } /** - * @typedef {Object} AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern + * @typedef {Object} AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern * @property {_1m1w1y24hPattern} average * @property {MetricPattern1} cumulative - * @property {MetricPattern18} height * @property {_1m1w1y24hPattern} max * @property {_1m1w1y24hPattern} median * @property {_1m1w1y24hPattern} min @@ -1863,20 +1862,20 @@ function createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPatter * @property {_1m1w1y24hPattern} pct25 * @property {_1m1w1y24hPattern} pct75 * @property {_1m1w1y24hPattern} pct90 + * @property {MetricPattern1} raw * @property {_1m1w1y24hPattern} sum */ /** - * Create a AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern pattern node + * Create a AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern} + * @returns {AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern} */ -function createAverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) { +function createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern(client, acc) { return { average: create_1m1w1y24hPattern(client, _m(acc, 'average')), cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - height: createMetricPattern18(client, acc), max: create_1m1w1y24hPattern(client, _m(acc, 'max')), median: create_1m1w1y24hPattern(client, _m(acc, 'median')), min: create_1m1w1y24hPattern(client, _m(acc, 'min')), @@ -1884,6 +1883,7 @@ function createAverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern pct25: create_1m1w1y24hPattern(client, _m(acc, 'pct25')), pct75: create_1m1w1y24hPattern(client, _m(acc, 'pct75')), pct90: create_1m1w1y24hPattern(client, _m(acc, 'pct90')), + raw: createMetricPattern1(client, acc), sum: create_1m1w1y24hPattern(client, _m(acc, 'sum')), }; } @@ -1967,7 +1967,7 @@ function createBpsPct1Pct2Pct5Pct95Pct98Pct99RatioSmaPattern(client, acc) { * @property {BpsRatioPattern} nupl * @property {CentsSatsUsdPattern} price * @property {BpsRatioPattern} priceRatio - * @property {CumulativeRawSumPattern} profit + * @property {CumulativeRawSumPattern2} profit * @property {InPattern} sent * @property {RatioValuePattern} sopr */ @@ -1987,7 +1987,7 @@ function createCapLossMvrvNetNuplPriceProfitSentSoprPattern(client, acc) { nupl: createBpsRatioPattern(client, _m(acc, 'nupl_ratio')), price: createCentsSatsUsdPattern(client, _m(acc, 'realized_price')), priceRatio: createBpsRatioPattern(client, _m(acc, 'realized_price_ratio')), - profit: createCumulativeRawSumPattern(client, _m(acc, 'realized_profit')), + profit: createCumulativeRawSumPattern2(client, _m(acc, 'realized_profit')), sent: createInPattern(client, _m(acc, 'sent_in')), sopr: createRatioValuePattern(client, acc), }; @@ -2337,85 +2337,87 @@ function createCumulativeDistributionRawRelSumValuePattern(client, acc) { } /** - * @typedef {Object} GrossInvestedInvestorLossNetProfitSentimentPattern + * @typedef {Object} GrossInvestedInvestorLossNetProfitSentimentPattern2 * @property {CentsUsdPattern} grossPnl - * @property {InPattern5} investedCapital + * @property {InPattern4} investedCapital * @property {InPattern2} investorCap - * @property {NegativeRawSumSupplyPattern} loss - * @property {CentsUsdPattern} netPnl - * @property {RawSumSupplyPattern} profit + * @property {NegativeRawRelSumSupplyPattern2} loss + * @property {CentsRelUsdPattern2} netPnl + * @property {RawRelSumSupplyPattern2} profit * @property {GreedNetPainPattern} sentiment */ /** - * Create a GrossInvestedInvestorLossNetProfitSentimentPattern pattern node + * Create a GrossInvestedInvestorLossNetProfitSentimentPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {GrossInvestedInvestorLossNetProfitSentimentPattern} + * @returns {GrossInvestedInvestorLossNetProfitSentimentPattern2} */ -function createGrossInvestedInvestorLossNetProfitSentimentPattern(client, acc) { +function createGrossInvestedInvestorLossNetProfitSentimentPattern2(client, acc) { return { grossPnl: createCentsUsdPattern(client, _m(acc, 'unrealized_gross_pnl')), - investedCapital: createInPattern5(client, _m(acc, 'invested_capital_in')), + investedCapital: createInPattern4(client, _m(acc, 'invested_capital_in')), investorCap: createInPattern2(client, _m(acc, 'investor_cap_in')), - loss: createNegativeRawSumSupplyPattern(client, acc), - netPnl: createCentsUsdPattern(client, _m(acc, 'net_unrealized_pnl')), - profit: createRawSumSupplyPattern(client, acc), + loss: createNegativeRawRelSumSupplyPattern2(client, acc), + netPnl: createCentsRelUsdPattern2(client, _m(acc, 'net_unrealized_pnl')), + profit: createRawRelSumSupplyPattern2(client, acc), sentiment: createGreedNetPainPattern(client, acc), }; } /** - * @typedef {Object} ActivityOutputsRealizedRelativeSupplyUnrealizedPattern - * @property {CoindaysSentPattern} activity - * @property {UtxoPattern2} outputs - * @property {CapLossMvrvNetNuplPriceProfitSentSoprPattern} realized - * @property {SupplyPattern} relative - * @property {DeltaHalvedTotalPattern} supply - * @property {InvestedInvestorLossNetProfitPattern} unrealized + * @typedef {Object} NegativeRawRelSumSupplyPattern2 + * @property {MetricPattern1} negative + * @property {CentsUsdPattern} raw + * @property {BpsPercentRatioPattern} relToMarketCap + * @property {BpsPercentRatioPattern} relToOwnGrossPnl + * @property {BpsPercentRatioPattern} relToOwnMarketCap + * @property {_24hPattern} sum + * @property {BtcCentsRelSatsUsdPattern3} supply */ /** - * Create a ActivityOutputsRealizedRelativeSupplyUnrealizedPattern pattern node + * Create a NegativeRawRelSumSupplyPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} + * @returns {NegativeRawRelSumSupplyPattern2} */ -function createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, acc) { +function createNegativeRawRelSumSupplyPattern2(client, acc) { return { - activity: createCoindaysSentPattern(client, acc), - outputs: createUtxoPattern2(client, _m(acc, 'utxo_count')), - realized: createCapLossMvrvNetNuplPriceProfitSentSoprPattern(client, acc), - relative: createSupplyPattern(client, _m(acc, 'supply')), - supply: createDeltaHalvedTotalPattern(client, _m(acc, 'supply')), - unrealized: createInvestedInvestorLossNetProfitPattern(client, acc), + negative: createMetricPattern1(client, _m(acc, 'neg_unrealized_loss')), + raw: createCentsUsdPattern(client, _m(acc, 'unrealized_loss')), + relToMarketCap: createBpsPercentRatioPattern(client, _m(acc, 'unrealized_loss_rel_to_market_cap')), + relToOwnGrossPnl: createBpsPercentRatioPattern(client, _m(acc, 'unrealized_loss_rel_to_own_gross_pnl')), + relToOwnMarketCap: createBpsPercentRatioPattern(client, _m(acc, 'unrealized_loss_rel_to_own_market_cap')), + sum: create_24hPattern(client, _m(acc, 'unrealized_loss_24h')), + supply: createBtcCentsRelSatsUsdPattern3(client, _m(acc, 'supply_in_loss')), }; } /** - * @typedef {Object} ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 - * @property {CoindaysSentPattern} activity - * @property {UtxoPattern2} outputs - * @property {CapLossMvrvNetNuplPriceProfitSentSoprPattern} realized - * @property {SupplyPattern} relative - * @property {DeltaHalvedTotalPattern} supply - * @property {LossNetProfitPattern2} unrealized + * @typedef {Object} BtcCentsRelSatsUsdPattern3 + * @property {MetricPattern1} btc + * @property {MetricPattern1} cents + * @property {BpsPercentRatioPattern} relToCirculatingSupply + * @property {BpsPercentRatioPattern} relToOwnSupply + * @property {MetricPattern1} sats + * @property {MetricPattern1} usd */ /** - * Create a ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 pattern node + * Create a BtcCentsRelSatsUsdPattern3 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} + * @returns {BtcCentsRelSatsUsdPattern3} */ -function createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, acc) { +function createBtcCentsRelSatsUsdPattern3(client, acc) { return { - activity: createCoindaysSentPattern(client, acc), - outputs: createUtxoPattern2(client, _m(acc, 'utxo_count')), - realized: createCapLossMvrvNetNuplPriceProfitSentSoprPattern(client, acc), - relative: createSupplyPattern(client, _m(acc, 'supply')), - supply: createDeltaHalvedTotalPattern(client, _m(acc, 'supply')), - unrealized: createLossNetProfitPattern2(client, acc), + btc: createMetricPattern1(client, acc), + cents: createMetricPattern1(client, _m(acc, 'cents')), + relToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')), + relToOwnSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_own_supply')), + sats: createMetricPattern1(client, _m(acc, 'sats')), + usd: createMetricPattern1(client, _m(acc, 'usd')), }; } @@ -2448,7 +2450,7 @@ function createCapLowerPriceUpperPattern(client, acc) { /** * @typedef {Object} ChangeCumulativeDeltaRawRelSumPattern - * @property {RelPattern2} change1m + * @property {RelPattern} change1m * @property {MetricPattern1} cumulative * @property {ChangeRatePattern4} delta * @property {MetricPattern1} raw @@ -2464,7 +2466,7 @@ function createCapLowerPriceUpperPattern(client, acc) { */ function createChangeCumulativeDeltaRawRelSumPattern(client, acc) { return { - change1m: createRelPattern2(client, _m(acc, 'pnl_change_1m_rel_to')), + change1m: createRelPattern(client, _m(acc, 'pnl_change_1m_rel_to')), cumulative: createMetricPattern1(client, _m(acc, 'realized_pnl_cumulative')), delta: createChangeRatePattern4(client, _m(acc, 'pnl_delta')), raw: createMetricPattern1(client, _m(acc, 'realized_pnl')), @@ -2473,6 +2475,83 @@ function createChangeCumulativeDeltaRawRelSumPattern(client, acc) { }; } +/** + * @typedef {Object} RawRelSumSupplyPattern2 + * @property {CentsUsdPattern} raw + * @property {BpsPercentRatioPattern} relToMarketCap + * @property {BpsPercentRatioPattern} relToOwnGrossPnl + * @property {BpsPercentRatioPattern} relToOwnMarketCap + * @property {_24hPattern} sum + * @property {BtcCentsRelSatsUsdPattern3} supply + */ + +/** + * Create a RawRelSumSupplyPattern2 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {RawRelSumSupplyPattern2} + */ +function createRawRelSumSupplyPattern2(client, acc) { + return { + raw: createCentsUsdPattern(client, _m(acc, 'unrealized_profit')), + relToMarketCap: createBpsPercentRatioPattern(client, _m(acc, 'unrealized_profit_rel_to_market_cap')), + relToOwnGrossPnl: createBpsPercentRatioPattern(client, _m(acc, 'unrealized_profit_rel_to_own_gross_pnl')), + relToOwnMarketCap: createBpsPercentRatioPattern(client, _m(acc, 'unrealized_profit_rel_to_own_market_cap')), + sum: create_24hPattern(client, _m(acc, 'unrealized_profit_24h')), + supply: createBtcCentsRelSatsUsdPattern3(client, _m(acc, 'supply_in_profit')), + }; +} + +/** + * @typedef {Object} ActivityOutputsRealizedSupplyUnrealizedPattern + * @property {CoindaysSentPattern} activity + * @property {UtxoPattern2} outputs + * @property {CapLossMvrvNetNuplPriceProfitSentSoprPattern} realized + * @property {DeltaHalvedRelTotalPattern} supply + * @property {InvestedInvestorLossNetProfitPattern} unrealized + */ + +/** + * Create a ActivityOutputsRealizedSupplyUnrealizedPattern pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {ActivityOutputsRealizedSupplyUnrealizedPattern} + */ +function createActivityOutputsRealizedSupplyUnrealizedPattern(client, acc) { + return { + activity: createCoindaysSentPattern(client, acc), + outputs: createUtxoPattern2(client, _m(acc, 'utxo_count')), + realized: createCapLossMvrvNetNuplPriceProfitSentSoprPattern(client, acc), + supply: createDeltaHalvedRelTotalPattern(client, _m(acc, 'supply')), + unrealized: createInvestedInvestorLossNetProfitPattern(client, acc), + }; +} + +/** + * @typedef {Object} ActivityOutputsRealizedSupplyUnrealizedPattern2 + * @property {CoindaysSentPattern} activity + * @property {UtxoPattern2} outputs + * @property {CapLossMvrvNetNuplPriceProfitSentSoprPattern} realized + * @property {DeltaHalvedRelTotalPattern} supply + * @property {LossNetProfitPattern} unrealized + */ + +/** + * Create a ActivityOutputsRealizedSupplyUnrealizedPattern2 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {ActivityOutputsRealizedSupplyUnrealizedPattern2} + */ +function createActivityOutputsRealizedSupplyUnrealizedPattern2(client, acc) { + return { + activity: createCoindaysSentPattern(client, acc), + outputs: createUtxoPattern2(client, _m(acc, 'utxo_count')), + realized: createCapLossMvrvNetNuplPriceProfitSentSoprPattern(client, acc), + supply: createDeltaHalvedRelTotalPattern(client, _m(acc, 'supply')), + unrealized: createLossNetProfitPattern(client, acc), + }; +} + /** * @typedef {Object} AddrOutputsRealizedSupplyPattern * @property {MetricPattern1} addrCount @@ -2499,51 +2578,51 @@ function createAddrOutputsRealizedSupplyPattern(client, acc) { } /** - * @typedef {Object} BtcCentsSatsSumUsdPattern2 + * @typedef {Object} BtcCentsRelSatsUsdPattern * @property {MetricPattern1} btc * @property {MetricPattern1} cents + * @property {BpsPercentRatioPattern} relToCirculatingSupply * @property {MetricPattern1} sats - * @property {_1m1w1y24hPattern5} sum * @property {MetricPattern1} usd */ /** - * Create a BtcCentsSatsSumUsdPattern2 pattern node + * Create a BtcCentsRelSatsUsdPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {BtcCentsSatsSumUsdPattern2} + * @returns {BtcCentsRelSatsUsdPattern} */ -function createBtcCentsSatsSumUsdPattern2(client, acc) { +function createBtcCentsRelSatsUsdPattern(client, acc) { return { btc: createMetricPattern1(client, acc), cents: createMetricPattern1(client, _m(acc, 'cents')), + relToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')), sats: createMetricPattern1(client, _m(acc, 'sats')), - sum: create_1m1w1y24hPattern5(client, acc), usd: createMetricPattern1(client, _m(acc, 'usd')), }; } /** - * @typedef {Object} BtcCentsSatsSumUsdPattern + * @typedef {Object} BtcCentsRelSatsUsdPattern2 * @property {MetricPattern1} btc * @property {MetricPattern1} cents + * @property {BpsPercentRatioPattern} relToOwnSupply * @property {MetricPattern1} sats - * @property {_24hPattern3} sum * @property {MetricPattern1} usd */ /** - * Create a BtcCentsSatsSumUsdPattern pattern node + * Create a BtcCentsRelSatsUsdPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {BtcCentsSatsSumUsdPattern} + * @returns {BtcCentsRelSatsUsdPattern2} */ -function createBtcCentsSatsSumUsdPattern(client, acc) { +function createBtcCentsRelSatsUsdPattern2(client, acc) { return { btc: createMetricPattern1(client, acc), cents: createMetricPattern1(client, _m(acc, 'cents')), + relToOwnSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_own_supply')), sats: createMetricPattern1(client, _m(acc, 'sats')), - sum: create_24hPattern3(client, _m(acc, '24h')), usd: createMetricPattern1(client, _m(acc, 'usd')), }; } @@ -2573,31 +2652,6 @@ function createCentsDeltaRawRelUsdPattern(client, acc) { }; } -/** - * @typedef {Object} CoinblocksCoindaysDormancySentVelocityPattern - * @property {CumulativeRawPattern} coinblocksDestroyed - * @property {CumulativeRawSumPattern2} coindaysDestroyed - * @property {MetricPattern1} dormancy - * @property {RawSumPattern3} sent - * @property {MetricPattern1} velocity - */ - -/** - * Create a CoinblocksCoindaysDormancySentVelocityPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {CoinblocksCoindaysDormancySentVelocityPattern} - */ -function createCoinblocksCoindaysDormancySentVelocityPattern(client, acc) { - return { - coinblocksDestroyed: createCumulativeRawPattern(client, _m(acc, 'coinblocks_destroyed')), - coindaysDestroyed: createCumulativeRawSumPattern2(client, _m(acc, 'coindays_destroyed')), - dormancy: createMetricPattern1(client, _m(acc, 'dormancy')), - sent: createRawSumPattern3(client, _m(acc, 'sent')), - velocity: createMetricPattern1(client, _m(acc, 'velocity')), - }; -} - /** * @typedef {Object} EmaHistogramLineSignalPattern * @property {MetricPattern1} emaFast @@ -2673,31 +2727,6 @@ function createPhsReboundThsPattern(client, acc) { }; } -/** - * @typedef {Object} RatioValuePattern2 - * @property {_1m1w1y24hPattern} ratio - * @property {MetricPattern1} valueCreated - * @property {_1m1w1y24hPattern} valueCreatedSum - * @property {MetricPattern1} valueDestroyed - * @property {_1m1w1y24hPattern} valueDestroyedSum - */ - -/** - * Create a RatioValuePattern2 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {RatioValuePattern2} - */ -function createRatioValuePattern2(client, acc) { - return { - ratio: create_1m1w1y24hPattern(client, _m(acc, 'sopr')), - valueCreated: createMetricPattern1(client, _m(acc, 'value_created')), - valueCreatedSum: create_1m1w1y24hPattern(client, _m(acc, 'value_created')), - valueDestroyed: createMetricPattern1(client, _m(acc, 'value_destroyed')), - valueDestroyedSum: create_1m1w1y24hPattern(client, _m(acc, 'value_destroyed')), - }; -} - /** * @template T * @typedef {Object} _1m1w1y24hHeightPattern @@ -2978,6 +3007,52 @@ function createBtcCentsSatsUsdPattern(client, acc) { }; } +/** + * @typedef {Object} CentsRelUsdPattern2 + * @property {MetricPattern1} cents + * @property {BpsPercentRatioPattern} relToOwnGrossPnl + * @property {BpsPercentRatioPattern} relToOwnMarketCap + * @property {MetricPattern1} usd + */ + +/** + * Create a CentsRelUsdPattern2 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {CentsRelUsdPattern2} + */ +function createCentsRelUsdPattern2(client, acc) { + return { + cents: createMetricPattern1(client, _m(acc, 'cents')), + relToOwnGrossPnl: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_own_gross_pnl')), + relToOwnMarketCap: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_own_market_cap')), + usd: createMetricPattern1(client, acc), + }; +} + +/** + * @typedef {Object} CoindaysDormancySentVelocityPattern + * @property {CumulativeRawSumPattern} coindaysDestroyed + * @property {MetricPattern1} dormancy + * @property {RawSumPattern3} sent + * @property {MetricPattern1} velocity + */ + +/** + * Create a CoindaysDormancySentVelocityPattern pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {CoindaysDormancySentVelocityPattern} + */ +function createCoindaysDormancySentVelocityPattern(client, acc) { + return { + coindaysDestroyed: createCumulativeRawSumPattern(client, _m(acc, 'coindays_destroyed')), + dormancy: createMetricPattern1(client, _m(acc, 'dormancy')), + sent: createRawSumPattern3(client, _m(acc, 'sent')), + velocity: createMetricPattern1(client, _m(acc, 'velocity')), + }; +} + /** * @typedef {Object} CumulativeNegativeRawSumPattern * @property {MetricPattern1} cumulative @@ -3001,6 +3076,52 @@ function createCumulativeNegativeRawSumPattern(client, acc) { }; } +/** + * @typedef {Object} DeltaHalvedRelTotalPattern + * @property {ChangeRatePattern} delta + * @property {BtcCentsSatsUsdPattern} halved + * @property {BpsPercentRatioPattern} relToCirculatingSupply + * @property {BtcCentsSatsUsdPattern} total + */ + +/** + * Create a DeltaHalvedRelTotalPattern pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {DeltaHalvedRelTotalPattern} + */ +function createDeltaHalvedRelTotalPattern(client, acc) { + return { + delta: createChangeRatePattern(client, _m(acc, 'delta')), + halved: createBtcCentsSatsUsdPattern(client, _m(acc, 'halved')), + relToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')), + total: createBtcCentsSatsUsdPattern(client, acc), + }; +} + +/** + * @typedef {Object} DeltaHalvedRelTotalPattern2 + * @property {ChangeRatePattern2} delta + * @property {BtcCentsSatsUsdPattern} halved + * @property {BpsPercentRatioPattern} relToCirculatingSupply + * @property {BtcCentsSatsUsdPattern} total + */ + +/** + * Create a DeltaHalvedRelTotalPattern2 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {DeltaHalvedRelTotalPattern2} + */ +function createDeltaHalvedRelTotalPattern2(client, acc) { + return { + delta: createChangeRatePattern2(client, _m(acc, 'delta')), + halved: createBtcCentsSatsUsdPattern(client, _m(acc, 'halved')), + relToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')), + total: createBtcCentsSatsUsdPattern(client, acc), + }; +} + /** * @typedef {Object} InvestedMaxMinPercentilesPattern * @property {Pct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65Pct70Pct75Pct80Pct85Pct90Pct95Pattern} investedCapital @@ -3029,7 +3150,7 @@ function createInvestedMaxMinPercentilesPattern(client, acc) { * @property {MetricPattern1} negative * @property {CentsUsdPattern} raw * @property {_24hPattern} sum - * @property {BtcCentsSatsUsdPattern} supply + * @property {BtcCentsRelSatsUsdPattern} supply */ /** @@ -3043,7 +3164,7 @@ function createNegativeRawSumSupplyPattern(client, acc) { negative: createMetricPattern1(client, _m(acc, 'neg_unrealized_loss')), raw: createCentsUsdPattern(client, _m(acc, 'unrealized_loss')), sum: create_24hPattern(client, _m(acc, 'unrealized_loss_24h')), - supply: createBtcCentsSatsUsdPattern(client, _m(acc, 'supply_in_loss')), + supply: createBtcCentsRelSatsUsdPattern(client, _m(acc, 'supply_in_loss')), }; } @@ -3118,7 +3239,7 @@ function createBaseCumulativeSumPattern(client, acc) { /** * @typedef {Object} BlocksDominanceRewardsPattern - * @property {CumulativeHeightSumPattern} blocksMined + * @property {CumulativeRawSumPattern} blocksMined * @property {_1m1w1y24hBpsPercentRatioPattern} dominance * @property {BaseCumulativeSumPattern} rewards */ @@ -3131,7 +3252,7 @@ function createBaseCumulativeSumPattern(client, acc) { */ function createBlocksDominanceRewardsPattern(client, acc) { return { - blocksMined: createCumulativeHeightSumPattern(client, _m(acc, 'blocks_mined')), + blocksMined: createCumulativeRawSumPattern(client, _m(acc, 'blocks_mined')), dominance: create_1m1w1y24hBpsPercentRatioPattern(client, _m(acc, 'dominance')), rewards: createBaseCumulativeSumPattern(client, _m(acc, 'rewards')), }; @@ -3264,54 +3385,33 @@ function createCentsSatsUsdPattern(client, acc) { } /** - * @typedef {Object} CumulativeHeightRelPattern + * @typedef {Object} CumulativeRawRelPattern * @property {MetricPattern1} cumulative - * @property {MetricPattern18} height + * @property {MetricPattern1} raw * @property {BpsPercentRatioPattern} relToRcap */ /** - * Create a CumulativeHeightRelPattern pattern node + * Create a CumulativeRawRelPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {CumulativeHeightRelPattern} + * @returns {CumulativeRawRelPattern} */ -function createCumulativeHeightRelPattern(client, acc) { +function createCumulativeRawRelPattern(client, acc) { return { cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - height: createMetricPattern18(client, acc), + raw: createMetricPattern1(client, acc), relToRcap: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_realized_cap')), }; } /** - * @typedef {Object} CumulativeRawSumPattern + * @typedef {Object} CumulativeRawSumPattern2 * @property {MetricPattern1} cumulative * @property {CentsUsdPattern} raw * @property {_24hPattern} sum */ -/** - * Create a CumulativeRawSumPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {CumulativeRawSumPattern} - */ -function createCumulativeRawSumPattern(client, acc) { - return { - cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - raw: createCentsUsdPattern(client, acc), - sum: create_24hPattern(client, _m(acc, '24h')), - }; -} - -/** - * @typedef {Object} CumulativeRawSumPattern2 - * @property {MetricPattern1} cumulative - * @property {MetricPattern1} raw - * @property {_1m1w1y24hPattern} sum - */ - /** * Create a CumulativeRawSumPattern2 pattern node * @param {BrkClientBase} client @@ -3321,50 +3421,8 @@ function createCumulativeRawSumPattern(client, acc) { function createCumulativeRawSumPattern2(client, acc) { return { cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - raw: createMetricPattern1(client, acc), - sum: create_1m1w1y24hPattern(client, acc), - }; -} - -/** - * @typedef {Object} DeltaHalvedTotalPattern - * @property {ChangeRatePattern} delta - * @property {BtcCentsSatsUsdPattern} halved - * @property {BtcCentsSatsUsdPattern} total - */ - -/** - * Create a DeltaHalvedTotalPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {DeltaHalvedTotalPattern} - */ -function createDeltaHalvedTotalPattern(client, acc) { - return { - delta: createChangeRatePattern(client, _m(acc, 'delta')), - halved: createBtcCentsSatsUsdPattern(client, _m(acc, 'halved')), - total: createBtcCentsSatsUsdPattern(client, acc), - }; -} - -/** - * @typedef {Object} DeltaHalvedTotalPattern2 - * @property {ChangeRatePattern2} delta - * @property {BtcCentsSatsUsdPattern} halved - * @property {BtcCentsSatsUsdPattern} total - */ - -/** - * Create a DeltaHalvedTotalPattern2 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {DeltaHalvedTotalPattern2} - */ -function createDeltaHalvedTotalPattern2(client, acc) { - return { - delta: createChangeRatePattern2(client, _m(acc, 'delta')), - halved: createBtcCentsSatsUsdPattern(client, _m(acc, 'halved')), - total: createBtcCentsSatsUsdPattern(client, acc), + raw: createCentsUsdPattern(client, acc), + sum: create_24hPattern(client, _m(acc, '24h')), }; } @@ -3390,61 +3448,19 @@ function createGreedNetPainPattern(client, acc) { } /** - * @typedef {Object} InRelPattern - * @property {RelPattern} inLoss - * @property {RelPattern} inProfit - * @property {BpsPercentRatioPattern} relToCirculatingSupply - */ - -/** - * Create a InRelPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {InRelPattern} - */ -function createInRelPattern(client, acc) { - return { - inLoss: createRelPattern(client, _m(acc, 'in_loss_rel_to_circulating_supply')), - inProfit: createRelPattern(client, _m(acc, 'in_profit_rel_to_circulating_supply')), - relToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')), - }; -} - -/** - * @typedef {Object} InRelPattern2 - * @property {RelPattern6} inLoss - * @property {RelPattern6} inProfit - * @property {BpsPercentRatioPattern} relToCirculatingSupply - */ - -/** - * Create a InRelPattern2 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {InRelPattern2} - */ -function createInRelPattern2(client, acc) { - return { - inLoss: createRelPattern6(client, _m(acc, 'in_loss_rel_to')), - inProfit: createRelPattern6(client, _m(acc, 'in_profit_rel_to')), - relToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')), - }; -} - -/** - * @typedef {Object} LossNetProfitPattern2 + * @typedef {Object} LossNetProfitPattern * @property {NegativeRawSumSupplyPattern} loss * @property {CentsUsdPattern} netPnl * @property {RawSumSupplyPattern} profit */ /** - * Create a LossNetProfitPattern2 pattern node + * Create a LossNetProfitPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {LossNetProfitPattern2} + * @returns {LossNetProfitPattern} */ -function createLossNetProfitPattern2(client, acc) { +function createLossNetProfitPattern(client, acc) { return { loss: createNegativeRawSumSupplyPattern(client, acc), netPnl: createCentsUsdPattern(client, _m(acc, 'net_unrealized_pnl')), @@ -3452,27 +3468,6 @@ function createLossNetProfitPattern2(client, acc) { }; } -/** - * @typedef {Object} LossNetProfitPattern3 - * @property {RelPattern7} loss - * @property {RelPattern8} netPnl - * @property {RelPattern7} profit - */ - -/** - * Create a LossNetProfitPattern3 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {LossNetProfitPattern3} - */ -function createLossNetProfitPattern3(client, acc) { - return { - loss: createRelPattern7(client, _m(acc, 'unrealized_loss_rel_to')), - netPnl: createRelPattern8(client, _m(acc, 'net_unrealized_pnl_rel_to_own')), - profit: createRelPattern7(client, _m(acc, 'unrealized_profit_rel_to')), - }; -} - /** * @typedef {Object} OutputsRealizedSupplyPattern * @property {UtxoPattern} outputs @@ -3494,6 +3489,27 @@ function createOutputsRealizedSupplyPattern(client, acc) { }; } +/** + * @typedef {Object} RatioValuePattern2 + * @property {_1m1w1y24hPattern} ratio + * @property {BaseSumPattern} valueCreated + * @property {BaseSumPattern} valueDestroyed + */ + +/** + * Create a RatioValuePattern2 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {RatioValuePattern2} + */ +function createRatioValuePattern2(client, acc) { + return { + ratio: create_1m1w1y24hPattern(client, _m(acc, 'sopr')), + valueCreated: createBaseSumPattern(client, _m(acc, 'value_created')), + valueDestroyed: createBaseSumPattern(client, _m(acc, 'value_destroyed')), + }; +} + /** * @typedef {Object} RatioValuePattern * @property {_24hPattern2} ratio @@ -3540,7 +3556,7 @@ function createRawSellSumPattern(client, acc) { * @typedef {Object} RawSumSupplyPattern * @property {CentsUsdPattern} raw * @property {_24hPattern} sum - * @property {BtcCentsSatsUsdPattern} supply + * @property {BtcCentsRelSatsUsdPattern} supply */ /** @@ -3553,28 +3569,28 @@ function createRawSumSupplyPattern(client, acc) { return { raw: createCentsUsdPattern(client, _m(acc, 'unrealized_profit')), sum: create_24hPattern(client, _m(acc, 'unrealized_profit_24h')), - supply: createBtcCentsSatsUsdPattern(client, _m(acc, 'supply_in_profit')), + supply: createBtcCentsRelSatsUsdPattern(client, _m(acc, 'supply_in_profit')), }; } /** - * @typedef {Object} RelPattern7 - * @property {BpsPercentRatioPattern} relToMarketCap - * @property {BpsPercentRatioPattern} relToOwnGrossPnl - * @property {BpsPercentRatioPattern} relToOwnMarketCap + * @typedef {Object} RawSumSupplyPattern2 + * @property {CentsUsdPattern} raw + * @property {_24hPattern} sum + * @property {BtcCentsSatsUsdPattern} supply */ /** - * Create a RelPattern7 pattern node + * Create a RawSumSupplyPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {RelPattern7} + * @returns {RawSumSupplyPattern2} */ -function createRelPattern7(client, acc) { +function createRawSumSupplyPattern2(client, acc) { return { - relToMarketCap: createBpsPercentRatioPattern(client, _m(acc, 'market_cap')), - relToOwnGrossPnl: createBpsPercentRatioPattern(client, _m(acc, 'own_gross_pnl')), - relToOwnMarketCap: createBpsPercentRatioPattern(client, _m(acc, 'own_market_cap')), + raw: createCentsUsdPattern(client, _m(acc, 'unrealized_profit')), + sum: create_24hPattern(client, _m(acc, 'unrealized_profit_24h')), + supply: createBtcCentsSatsUsdPattern(client, _m(acc, 'supply_in_profit')), }; } @@ -3603,23 +3619,23 @@ function create_6bBlockTxindexPattern(client, acc) { /** * @template T - * @typedef {Object} CumulativeHeightSumPattern + * @typedef {Object} CumulativeRawSumPattern * @property {MetricPattern1} cumulative - * @property {MetricPattern18} height + * @property {MetricPattern1} raw * @property {_1m1w1y24hPattern} sum */ /** - * Create a CumulativeHeightSumPattern pattern node + * Create a CumulativeRawSumPattern pattern node * @template T * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {CumulativeHeightSumPattern} + * @returns {CumulativeRawSumPattern} */ -function createCumulativeHeightSumPattern(client, acc) { +function createCumulativeRawSumPattern(client, acc) { return { cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - height: createMetricPattern18(client, acc), + raw: createMetricPattern1(client, acc), sum: create_1m1w1y24hPattern(client, acc), }; } @@ -3664,7 +3680,7 @@ function createBaseSumPattern(client, acc) { /** * @typedef {Object} BlocksDominancePattern - * @property {CumulativeHeightPattern} blocksMined + * @property {CumulativeRawPattern} blocksMined * @property {BpsPercentRatioPattern} dominance */ @@ -3676,7 +3692,7 @@ function createBaseSumPattern(client, acc) { */ function createBlocksDominancePattern(client, acc) { return { - blocksMined: createCumulativeHeightPattern(client, _m(acc, 'blocks_mined')), + blocksMined: createCumulativeRawPattern(client, _m(acc, 'blocks_mined')), dominance: createBpsPercentRatioPattern(client, _m(acc, 'dominance')), }; } @@ -3814,44 +3830,6 @@ function createCoindaysSentPattern(client, acc) { }; } -/** - * @typedef {Object} CumulativeRawPattern - * @property {MetricPattern1} cumulative - * @property {MetricPattern1} raw - */ - -/** - * Create a CumulativeRawPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {CumulativeRawPattern} - */ -function createCumulativeRawPattern(client, acc) { - return { - cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - raw: createMetricPattern1(client, acc), - }; -} - -/** - * @typedef {Object} CumulativeHeightPattern - * @property {MetricPattern1} cumulative - * @property {MetricPattern18} height - */ - -/** - * Create a CumulativeHeightPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {CumulativeHeightPattern} - */ -function createCumulativeHeightPattern(client, acc) { - return { - cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - height: createMetricPattern18(client, acc), - }; -} - /** * @typedef {Object} HalvedTotalPattern * @property {BtcCentsSatsUsdPattern} halved @@ -3872,75 +3850,18 @@ function createHalvedTotalPattern(client, acc) { } /** - * @typedef {Object} HeightSumPattern - * @property {MetricPattern18} height - * @property {_1m1w1y24hPattern} sum - */ - -/** - * Create a HeightSumPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {HeightSumPattern} - */ -function createHeightSumPattern(client, acc) { - return { - height: createMetricPattern18(client, acc), - sum: create_1m1w1y24hPattern(client, _m(acc, 'sum')), - }; -} - -/** - * @typedef {Object} InPattern - * @property {BtcCentsSatsSumUsdPattern} inLoss - * @property {BtcCentsSatsSumUsdPattern} inProfit - */ - -/** - * Create a InPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {InPattern} - */ -function createInPattern(client, acc) { - return { - inLoss: createBtcCentsSatsSumUsdPattern(client, _m(acc, 'loss')), - inProfit: createBtcCentsSatsSumUsdPattern(client, _m(acc, 'profit')), - }; -} - -/** - * @typedef {Object} InPattern3 - * @property {BtcCentsSatsSumUsdPattern2} inLoss - * @property {BtcCentsSatsSumUsdPattern2} inProfit - */ - -/** - * Create a InPattern3 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {InPattern3} - */ -function createInPattern3(client, acc) { - return { - inLoss: createBtcCentsSatsSumUsdPattern2(client, _m(acc, 'loss')), - inProfit: createBtcCentsSatsSumUsdPattern2(client, _m(acc, 'profit')), - }; -} - -/** - * @typedef {Object} InPattern5 + * @typedef {Object} InPattern4 * @property {CentsRawUsdPattern} inLoss * @property {CentsRawUsdPattern} inProfit */ /** - * Create a InPattern5 pattern node + * Create a InPattern4 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {InPattern5} + * @returns {InPattern4} */ -function createInPattern5(client, acc) { +function createInPattern4(client, acc) { return { inLoss: createCentsRawUsdPattern(client, _m(acc, 'loss')), inProfit: createCentsRawUsdPattern(client, _m(acc, 'profit')), @@ -3966,10 +3887,48 @@ function createInPattern2(client, acc) { }; } +/** + * @typedef {Object} InPattern + * @property {RawSumPattern4} inLoss + * @property {RawSumPattern4} inProfit + */ + +/** + * Create a InPattern pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {InPattern} + */ +function createInPattern(client, acc) { + return { + inLoss: createRawSumPattern4(client, _m(acc, 'loss')), + inProfit: createRawSumPattern4(client, _m(acc, 'profit')), + }; +} + +/** + * @typedef {Object} InPattern3 + * @property {RawSumPattern5} inLoss + * @property {RawSumPattern5} inProfit + */ + +/** + * Create a InPattern3 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {InPattern3} + */ +function createInPattern3(client, acc) { + return { + inLoss: createRawSumPattern5(client, _m(acc, 'loss')), + inProfit: createRawSumPattern5(client, _m(acc, 'profit')), + }; +} + /** * @typedef {Object} LossProfitPattern2 - * @property {RawSumSupplyPattern} loss - * @property {RawSumSupplyPattern} profit + * @property {RawSumSupplyPattern2} loss + * @property {RawSumSupplyPattern2} profit */ /** @@ -3980,8 +3939,8 @@ function createInPattern2(client, acc) { */ function createLossProfitPattern2(client, acc) { return { - loss: createRawSumSupplyPattern(client, acc), - profit: createRawSumSupplyPattern(client, acc), + loss: createRawSumSupplyPattern2(client, acc), + profit: createRawSumSupplyPattern2(client, acc), }; } @@ -4004,6 +3963,44 @@ function createPriceValuePattern(client, acc) { }; } +/** + * @typedef {Object} RawSumPattern5 + * @property {BtcCentsSatsUsdPattern} raw + * @property {_1m1w1y24hPattern5} sum + */ + +/** + * Create a RawSumPattern5 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {RawSumPattern5} + */ +function createRawSumPattern5(client, acc) { + return { + raw: createBtcCentsSatsUsdPattern(client, acc), + sum: create_1m1w1y24hPattern5(client, acc), + }; +} + +/** + * @typedef {Object} RawSumPattern4 + * @property {BtcCentsSatsUsdPattern} raw + * @property {_24hPattern3} sum + */ + +/** + * Create a RawSumPattern4 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {RawSumPattern4} + */ +function createRawSumPattern4(client, acc) { + return { + raw: createBtcCentsSatsUsdPattern(client, acc), + sum: create_24hPattern3(client, _m(acc, '24h')), + }; +} + /** * @typedef {Object} RawSumPattern * @property {CentsUsdPattern} raw @@ -4043,81 +4040,24 @@ function createRealizedSupplyPattern(client, acc) { } /** - * @typedef {Object} RelPattern6 - * @property {BpsPercentRatioPattern} relToCirculatingSupply - * @property {BpsPercentRatioPattern} relToOwnSupply - */ - -/** - * Create a RelPattern6 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {RelPattern6} - */ -function createRelPattern6(client, acc) { - return { - relToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'circulating_supply')), - relToOwnSupply: createBpsPercentRatioPattern(client, _m(acc, 'own_supply')), - }; -} - -/** - * @typedef {Object} RelPattern4 - * @property {BpsPercentRatioPattern} relToMarketCap - * @property {BpsPercentRatioPattern} relToOwnGrossPnl - */ - -/** - * Create a RelPattern4 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {RelPattern4} - */ -function createRelPattern4(client, acc) { - return { - relToMarketCap: createBpsPercentRatioPattern(client, _m(acc, 'market_cap')), - relToOwnGrossPnl: createBpsPercentRatioPattern(client, _m(acc, 'own_gross_pnl')), - }; -} - -/** - * @typedef {Object} RelPattern2 + * @typedef {Object} RelPattern * @property {BpsPercentRatioPattern} relToMcap * @property {BpsPercentRatioPattern} relToRcap */ /** - * Create a RelPattern2 pattern node + * Create a RelPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated metric name - * @returns {RelPattern2} + * @returns {RelPattern} */ -function createRelPattern2(client, acc) { +function createRelPattern(client, acc) { return { relToMcap: createBpsPercentRatioPattern(client, _m(acc, 'market_cap')), relToRcap: createBpsPercentRatioPattern(client, _m(acc, 'realized_cap')), }; } -/** - * @typedef {Object} RelPattern8 - * @property {BpsPercentRatioPattern} relToOwnGrossPnl - * @property {BpsPercentRatioPattern} relToOwnMarketCap - */ - -/** - * Create a RelPattern8 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {RelPattern8} - */ -function createRelPattern8(client, acc) { - return { - relToOwnGrossPnl: createBpsPercentRatioPattern(client, _m(acc, 'gross_pnl')), - relToOwnMarketCap: createBpsPercentRatioPattern(client, _m(acc, 'market_cap')), - }; -} - /** * @typedef {Object} SdSmaPattern * @property {MetricPattern1} sd @@ -4137,25 +4077,6 @@ function createSdSmaPattern(client, acc) { }; } -/** - * @typedef {Object} SupplyUnrealizedPattern2 - * @property {InRelPattern2} supply - * @property {LossNetProfitPattern3} unrealized - */ - -/** - * Create a SupplyUnrealizedPattern2 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {SupplyUnrealizedPattern2} - */ -function createSupplyUnrealizedPattern2(client, acc) { - return { - supply: createInRelPattern2(client, _m(acc, 'supply')), - unrealized: createLossNetProfitPattern3(client, acc), - }; -} - /** * @typedef {Object} UtxoPattern2 * @property {MetricPattern1} utxoCount @@ -4213,6 +4134,27 @@ function createValuePattern(client, acc) { }; } +/** + * @template T + * @typedef {Object} CumulativeRawPattern + * @property {MetricPattern1} cumulative + * @property {MetricPattern1} raw + */ + +/** + * Create a CumulativeRawPattern pattern node + * @template T + * @param {BrkClientBase} client + * @param {string} acc - Accumulated metric name + * @returns {CumulativeRawPattern} + */ +function createCumulativeRawPattern(client, acc) { + return { + cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), + raw: createMetricPattern1(client, acc), + }; +} + /** * @template T * @typedef {Object} RawSumPattern3 @@ -4230,7 +4172,7 @@ function createValuePattern(client, acc) { function createRawSumPattern3(client, acc) { return { raw: createMetricPattern1(client, acc), - sum: create_1m1w1y24hPattern(client, acc), + sum: create_1m1w1y24hPattern(client, _m(acc, 'sum')), }; } @@ -4323,57 +4265,6 @@ function create_24hPattern(client, acc) { }; } -/** - * @typedef {Object} RelPattern - * @property {BpsPercentRatioPattern} relToCirculatingSupply - */ - -/** - * Create a RelPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {RelPattern} - */ -function createRelPattern(client, acc) { - return { - relToCirculatingSupply: createBpsPercentRatioPattern(client, acc), - }; -} - -/** - * @typedef {Object} RelPattern3 - * @property {BpsPercentRatioPattern} relToOwnSupply - */ - -/** - * Create a RelPattern3 pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {RelPattern3} - */ -function createRelPattern3(client, acc) { - return { - relToOwnSupply: createBpsPercentRatioPattern(client, acc), - }; -} - -/** - * @typedef {Object} SupplyPattern - * @property {InRelPattern} supply - */ - -/** - * Create a SupplyPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated metric name - * @returns {SupplyPattern} - */ -function createSupplyPattern(client, acc) { - return { - supply: createInRelPattern(client, acc), - }; -} - /** * @typedef {Object} UtxoPattern * @property {MetricPattern1} utxoCount @@ -4463,6 +4354,7 @@ function createRawPattern(client, acc) { * @property {MetricsTree_Cointime} cointime * @property {MetricsTree_Constants} constants * @property {MetricsTree_Indexes} indexes + * @property {MetricsTree_Indicators} indicators * @property {MetricsTree_Market} market * @property {MetricsTree_Pools} pools * @property {MetricsTree_Prices} prices @@ -4481,7 +4373,7 @@ function createRawPattern(client, acc) { * @property {MetricsTree_Blocks_Lookback} lookback * @property {_1m1w1y24hHeightPattern} interval * @property {MetricsTree_Blocks_Halving} halving - * @property {AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern} vbytes + * @property {AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern} vbytes * @property {MetricsTree_Blocks_Fullness} fullness */ @@ -4535,7 +4427,7 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Blocks_Count * @property {MetricPattern1} blockCountTarget - * @property {CumulativeHeightSumPattern} blockCount + * @property {CumulativeRawSumPattern} blockCount */ /** @@ -4620,7 +4512,7 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Transactions_Count - * @property {AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern} txCount + * @property {AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern} txCount * @property {MetricPattern19} isCoinbase */ @@ -4640,9 +4532,9 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Transactions_Versions - * @property {CumulativeHeightSumPattern} v1 - * @property {CumulativeHeightSumPattern} v2 - * @property {CumulativeHeightSumPattern} v3 + * @property {CumulativeRawSumPattern} v1 + * @property {CumulativeRawSumPattern} v2 + * @property {CumulativeRawSumPattern} v3 */ /** @@ -4731,19 +4623,19 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Scripts_Count - * @property {CumulativeHeightSumPattern} p2a - * @property {CumulativeHeightSumPattern} p2ms - * @property {CumulativeHeightSumPattern} p2pk33 - * @property {CumulativeHeightSumPattern} p2pk65 - * @property {CumulativeHeightSumPattern} p2pkh - * @property {CumulativeHeightSumPattern} p2sh - * @property {CumulativeHeightSumPattern} p2tr - * @property {CumulativeHeightSumPattern} p2wpkh - * @property {CumulativeHeightSumPattern} p2wsh - * @property {CumulativeHeightSumPattern} opreturn - * @property {CumulativeHeightSumPattern} emptyoutput - * @property {CumulativeHeightSumPattern} unknownoutput - * @property {CumulativeHeightSumPattern} segwit + * @property {CumulativeRawSumPattern} p2a + * @property {CumulativeRawSumPattern} p2ms + * @property {CumulativeRawSumPattern} p2pk33 + * @property {CumulativeRawSumPattern} p2pk65 + * @property {CumulativeRawSumPattern} p2pkh + * @property {CumulativeRawSumPattern} p2sh + * @property {CumulativeRawSumPattern} p2tr + * @property {CumulativeRawSumPattern} p2wpkh + * @property {CumulativeRawSumPattern} p2wsh + * @property {CumulativeRawSumPattern} opreturn + * @property {CumulativeRawSumPattern} emptyoutput + * @property {CumulativeRawSumPattern} unknownoutput + * @property {CumulativeRawSumPattern} segwit */ /** @@ -4772,6 +4664,7 @@ function createRawPattern(client, acc) { * @property {_1m1w1y24hBpsPercentRatioPattern} feeDominance * @property {_1m1w1y24hBpsPercentRatioPattern} subsidyDominance * @property {CentsUsdPattern} subsidySma1y + * @property {MetricsTree_Mining_Rewards_FeeRatioMultiple} feeRatioMultiple */ /** @@ -4784,6 +4677,14 @@ function createRawPattern(client, acc) { * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern2} _1y */ +/** + * @typedef {Object} MetricsTree_Mining_Rewards_FeeRatioMultiple + * @property {BpsRatioPattern} _24h + * @property {BpsRatioPattern} _1w + * @property {BpsRatioPattern} _1m + * @property {BpsRatioPattern} _1y + */ + /** * @typedef {Object} MetricsTree_Mining_Hashrate * @property {MetricPattern1} hashRate @@ -4821,8 +4722,8 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Cointime_Activity - * @property {CumulativeHeightSumPattern} coinblocksCreated - * @property {CumulativeHeightSumPattern} coinblocksStored + * @property {CumulativeRawSumPattern} coinblocksCreated + * @property {CumulativeRawSumPattern} coinblocksStored * @property {MetricPattern1} liveliness * @property {MetricPattern1} vaultedness * @property {MetricPattern1} activityToVaultednessRatio @@ -4836,10 +4737,10 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Cointime_Value - * @property {CumulativeHeightSumPattern} valueDestroyed - * @property {CumulativeHeightSumPattern} valueCreated - * @property {CumulativeHeightSumPattern} valueStored - * @property {CumulativeHeightSumPattern} vocdd + * @property {CumulativeRawSumPattern} valueDestroyed + * @property {CumulativeRawSumPattern} valueCreated + * @property {CumulativeRawSumPattern} valueStored + * @property {CumulativeRawSumPattern} vocdd */ /** @@ -4865,16 +4766,16 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Cointime_Adjusted - * @property {BpsPercentRatioPattern} adjInflationRate - * @property {MetricPattern1} adjTxVelocityBtc - * @property {MetricPattern1} adjTxVelocityUsd + * @property {BpsPercentRatioPattern} inflationRate + * @property {MetricPattern1} txVelocityBtc + * @property {MetricPattern1} txVelocityUsd */ /** * @typedef {Object} MetricsTree_Cointime_ReserveRisk + * @property {MetricPattern1} value * @property {MetricPattern18} vocddMedian1y * @property {MetricPattern18} hodlBank - * @property {MetricPattern1} reserveRisk */ /** @@ -5136,6 +5037,14 @@ function createRawPattern(client, acc) { * @property {MetricPattern21} identity */ +/** + * @typedef {Object} MetricsTree_Indicators + * @property {BpsRatioPattern} puellMultiple + * @property {BpsRatioPattern} nvt + * @property {BpsPercentRatioPattern} gini + * @property {BpsRatioPattern} rhodlRatio + */ + /** * @typedef {Object} MetricsTree_Market * @property {MetricsTree_Market_Ath} ath @@ -5145,7 +5054,7 @@ function createRawPattern(client, acc) { * @property {MetricsTree_Market_Range} range * @property {MetricsTree_Market_MovingAverage} movingAverage * @property {MetricsTree_Market_Dca} dca - * @property {MetricsTree_Market_Indicators} indicators + * @property {MetricsTree_Market_Technical} technical */ /** @@ -5586,27 +5495,24 @@ function createRawPattern(client, acc) { */ /** - * @typedef {Object} MetricsTree_Market_Indicators - * @property {BpsRatioPattern} puellMultiple - * @property {BpsRatioPattern} nvt - * @property {MetricsTree_Market_Indicators_Rsi} rsi + * @typedef {Object} MetricsTree_Market_Technical + * @property {MetricsTree_Market_Technical_Rsi} rsi * @property {BpsPercentRatioPattern} stochK * @property {BpsPercentRatioPattern} stochD * @property {BpsRatioPattern} piCycle - * @property {MetricsTree_Market_Indicators_Macd} macd - * @property {BpsPercentRatioPattern} gini + * @property {MetricsTree_Market_Technical_Macd} macd */ /** - * @typedef {Object} MetricsTree_Market_Indicators_Rsi + * @typedef {Object} MetricsTree_Market_Technical_Rsi * @property {AverageGainsLossesRsiStochPattern} _24h - * @property {MetricsTree_Market_Indicators_Rsi_1w} _1w - * @property {MetricsTree_Market_Indicators_Rsi_1m} _1m - * @property {MetricsTree_Market_Indicators_Rsi_1y} _1y + * @property {MetricsTree_Market_Technical_Rsi_1w} _1w + * @property {MetricsTree_Market_Technical_Rsi_1m} _1m + * @property {MetricsTree_Market_Technical_Rsi_1y} _1y */ /** - * @typedef {Object} MetricsTree_Market_Indicators_Rsi_1w + * @typedef {Object} MetricsTree_Market_Technical_Rsi_1w * @property {MetricPattern1} gains * @property {MetricPattern1} losses * @property {MetricPattern1} averageGain @@ -5620,7 +5526,7 @@ function createRawPattern(client, acc) { */ /** - * @typedef {Object} MetricsTree_Market_Indicators_Rsi_1m + * @typedef {Object} MetricsTree_Market_Technical_Rsi_1m * @property {MetricPattern1} gains * @property {MetricPattern1} losses * @property {MetricPattern1} averageGain @@ -5634,7 +5540,7 @@ function createRawPattern(client, acc) { */ /** - * @typedef {Object} MetricsTree_Market_Indicators_Rsi_1y + * @typedef {Object} MetricsTree_Market_Technical_Rsi_1y * @property {MetricPattern1} gains * @property {MetricPattern1} losses * @property {MetricPattern1} averageGain @@ -5648,15 +5554,15 @@ function createRawPattern(client, acc) { */ /** - * @typedef {Object} MetricsTree_Market_Indicators_Macd + * @typedef {Object} MetricsTree_Market_Technical_Macd * @property {EmaHistogramLineSignalPattern} _24h - * @property {MetricsTree_Market_Indicators_Macd_1w} _1w - * @property {MetricsTree_Market_Indicators_Macd_1m} _1m - * @property {MetricsTree_Market_Indicators_Macd_1y} _1y + * @property {MetricsTree_Market_Technical_Macd_1w} _1w + * @property {MetricsTree_Market_Technical_Macd_1m} _1m + * @property {MetricsTree_Market_Technical_Macd_1y} _1y */ /** - * @typedef {Object} MetricsTree_Market_Indicators_Macd_1w + * @typedef {Object} MetricsTree_Market_Technical_Macd_1w * @property {MetricPattern1} emaFast * @property {MetricPattern1} emaSlow * @property {MetricPattern1} line @@ -5665,7 +5571,7 @@ function createRawPattern(client, acc) { */ /** - * @typedef {Object} MetricsTree_Market_Indicators_Macd_1m + * @typedef {Object} MetricsTree_Market_Technical_Macd_1m * @property {MetricPattern1} emaFast * @property {MetricPattern1} emaSlow * @property {MetricPattern1} line @@ -5674,7 +5580,7 @@ function createRawPattern(client, acc) { */ /** - * @typedef {Object} MetricsTree_Market_Indicators_Macd_1y + * @typedef {Object} MetricsTree_Market_Technical_Macd_1y * @property {MetricPattern1} emaFast * @property {MetricPattern1} emaSlow * @property {MetricPattern1} line @@ -5902,6 +5808,7 @@ function createRawPattern(client, acc) { * @property {MetricsTree_Distribution_AddressesData} addressesData * @property {MetricsTree_Distribution_UtxoCohorts} utxoCohorts * @property {MetricsTree_Distribution_AddressCohorts} addressCohorts + * @property {CumulativeRawPattern} coinblocksDestroyed * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern} addrCount * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern} emptyAddrCount * @property {MetricsTree_Distribution_AddressActivity} addressActivity @@ -5950,59 +5857,76 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All - * @property {DeltaHalvedTotalPattern2} supply + * @property {MetricsTree_Distribution_UtxoCohorts_All_Supply} supply * @property {UtxoPattern3} outputs - * @property {CoinblocksCoindaysDormancySentVelocityPattern} activity + * @property {CoindaysDormancySentVelocityPattern} activity * @property {CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern} realized * @property {InvestedMaxMinPercentilesPattern} costBasis - * @property {GrossInvestedInvestorLossNetProfitSentimentPattern} unrealized - * @property {MetricsTree_Distribution_UtxoCohorts_All_Relative} relative + * @property {MetricsTree_Distribution_UtxoCohorts_All_Unrealized} unrealized */ /** - * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Relative - * @property {MetricsTree_Distribution_UtxoCohorts_All_Relative_Supply} supply - * @property {MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized} unrealized + * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Supply + * @property {ChangeRatePattern2} delta + * @property {BtcCentsSatsUsdPattern} total + * @property {BtcCentsSatsUsdPattern} halved */ /** - * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Relative_Supply - * @property {RelPattern3} inProfit - * @property {RelPattern3} inLoss + * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Unrealized + * @property {CentsUsdPattern} grossPnl + * @property {InPattern4} investedCapital + * @property {GreedNetPainPattern} sentiment + * @property {InPattern2} investorCap + * @property {MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Loss} loss + * @property {MetricsTree_Distribution_UtxoCohorts_All_Unrealized_NetPnl} netPnl + * @property {MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Profit} profit */ /** - * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized - * @property {RelPattern4} profit - * @property {RelPattern4} loss - * @property {MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized_NetPnl} netPnl + * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Loss + * @property {MetricPattern1} negative + * @property {CentsUsdPattern} raw + * @property {_24hPattern} sum + * @property {BtcCentsRelSatsUsdPattern2} supply + * @property {BpsPercentRatioPattern} relToMarketCap + * @property {BpsPercentRatioPattern} relToOwnGrossPnl */ /** - * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized_NetPnl + * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Unrealized_NetPnl + * @property {MetricPattern1} cents + * @property {MetricPattern1} usd + * @property {BpsPercentRatioPattern} relToOwnGrossPnl + */ + +/** + * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Profit + * @property {CentsUsdPattern} raw + * @property {_24hPattern} sum + * @property {BtcCentsRelSatsUsdPattern2} supply + * @property {BpsPercentRatioPattern} relToMarketCap * @property {BpsPercentRatioPattern} relToOwnGrossPnl */ /** * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_Sth * @property {CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern} realized - * @property {DeltaHalvedTotalPattern2} supply + * @property {DeltaHalvedRelTotalPattern2} supply * @property {UtxoPattern3} outputs - * @property {CoinblocksCoindaysDormancySentVelocityPattern} activity + * @property {CoindaysDormancySentVelocityPattern} activity * @property {InvestedMaxMinPercentilesPattern} costBasis - * @property {GrossInvestedInvestorLossNetProfitSentimentPattern} unrealized - * @property {SupplyUnrealizedPattern2} relative + * @property {GrossInvestedInvestorLossNetProfitSentimentPattern2} unrealized */ /** * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_Lth - * @property {DeltaHalvedTotalPattern2} supply + * @property {DeltaHalvedRelTotalPattern2} supply * @property {UtxoPattern3} outputs - * @property {CoinblocksCoindaysDormancySentVelocityPattern} activity + * @property {CoindaysDormancySentVelocityPattern} activity * @property {MetricsTree_Distribution_UtxoCohorts_Lth_Realized} realized * @property {InvestedMaxMinPercentilesPattern} costBasis - * @property {GrossInvestedInvestorLossNetProfitSentimentPattern} unrealized - * @property {SupplyUnrealizedPattern2} relative + * @property {GrossInvestedInvestorLossNetProfitSentimentPattern2} unrealized */ /** @@ -6013,7 +5937,7 @@ function createRawPattern(client, acc) { * @property {ChangeCumulativeDeltaRawRelSumPattern} netPnl * @property {MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr} sopr * @property {InPattern3} sent - * @property {CumulativeHeightRelPattern} peakRegret + * @property {CumulativeRawRelPattern} peakRegret * @property {CapLowerPriceUpperPattern} investor * @property {_1m1w1y24hPattern} profitToLossRatio * @property {CentsDeltaRawRelUsdPattern} cap @@ -6025,109 +5949,121 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr - * @property {RawSumPattern3} valueCreated - * @property {RawSumPattern3} valueDestroyed + * @property {MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueCreated} valueCreated + * @property {MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueDestroyed} valueDestroyed * @property {_1m1w1y24hPattern} ratio */ +/** + * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueCreated + * @property {_1m1w1y24hPattern} sum + * @property {MetricPattern1} raw + */ + +/** + * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueDestroyed + * @property {_1m1w1y24hPattern} sum + * @property {MetricPattern1} raw + */ + /** * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_AgeRange - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} upTo1h - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _1hTo1d - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _1dTo1w - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _1wTo1m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _1mTo2m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _2mTo3m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _3mTo4m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _4mTo5m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _5mTo6m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _6mTo1y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _1yTo2y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _2yTo3y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _3yTo4y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _4yTo5y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _5yTo6y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _6yTo7y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _7yTo8y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _8yTo10y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _10yTo12y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} _12yTo15y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern} from15y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} upTo1h + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _1hTo1d + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _1dTo1w + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _1wTo1m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _1mTo2m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _2mTo3m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _3mTo4m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _4mTo5m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _5mTo6m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _6mTo1y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _1yTo2y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _2yTo3y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _3yTo4y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _4yTo5y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _5yTo6y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _6yTo7y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _7yTo8y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _8yTo10y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _10yTo12y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} _12yTo15y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern} from15y */ /** * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_MaxAge - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _1w - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _1m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _3m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _4m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _5m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _6m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _1y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _3y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _4y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _5y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _6y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _7y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _8y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _10y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _12y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _15y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _1w + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _1m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _3m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _4m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _5m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _6m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _1y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _3y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _4y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _5y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _6y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _7y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _8y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _10y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _12y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _15y */ /** * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_MinAge - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _1d - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _1w - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _1m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _3m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _4m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _5m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _6m - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _1y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _3y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _4y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _5y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _6y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _7y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _8y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _10y - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _12y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _1d + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _1w + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _1m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _3m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _4m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _5m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _6m + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _1y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _3y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _4y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _5y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _6y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _7y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _8y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _10y + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _12y */ /** * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_Epoch - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _0 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _1 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _3 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _4 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _0 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _1 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _3 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _4 */ /** * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_Class - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2009 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2010 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2011 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2012 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2013 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2014 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2015 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2016 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2017 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2018 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2019 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2020 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2021 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2022 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2023 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2024 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2025 - * @property {ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2} _2026 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2009 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2010 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2011 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2012 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2013 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2014 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2015 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2016 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2017 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2018 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2019 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2020 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2021 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2022 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2023 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2024 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2025 + * @property {ActivityOutputsRealizedSupplyUnrealizedPattern2} _2026 */ /** @@ -6367,15 +6303,15 @@ function createRawPattern(client, acc) { /** * @typedef {Object} MetricsTree_Distribution_NewAddrCount - * @property {HeightSumPattern} all - * @property {HeightSumPattern} p2pk65 - * @property {HeightSumPattern} p2pk33 - * @property {HeightSumPattern} p2pkh - * @property {HeightSumPattern} p2sh - * @property {HeightSumPattern} p2wpkh - * @property {HeightSumPattern} p2wsh - * @property {HeightSumPattern} p2tr - * @property {HeightSumPattern} p2a + * @property {RawSumPattern3} all + * @property {RawSumPattern3} p2pk65 + * @property {RawSumPattern3} p2pk33 + * @property {RawSumPattern3} p2pkh + * @property {RawSumPattern3} p2sh + * @property {RawSumPattern3} p2wpkh + * @property {RawSumPattern3} p2wsh + * @property {RawSumPattern3} p2tr + * @property {RawSumPattern3} p2a */ /** @@ -6400,6 +6336,7 @@ function createRawPattern(client, acc) { * @property {CentsUsdPattern} marketCap * @property {ChangeRatePattern4} marketCapDelta * @property {_1m1w1y24hPattern} marketMinusRealizedCapGrowthRate + * @property {BtcCentsSatsUsdPattern} hodledOrLostCoins */ /** @@ -7403,7 +7340,7 @@ class BrkClient extends BrkClientBase { }, count: { blockCountTarget: createMetricPattern1(this, 'block_count_target'), - blockCount: createCumulativeHeightSumPattern(this, 'block_count'), + blockCount: createCumulativeRawSumPattern(this, 'block_count'), }, lookback: { height1hAgo: createMetricPattern18(this, 'height_1h_ago'), @@ -7456,7 +7393,7 @@ class BrkClient extends BrkClientBase { blocksBeforeNextHalving: createMetricPattern1(this, 'blocks_before_next_halving'), daysBeforeNextHalving: createMetricPattern1(this, 'days_before_next_halving'), }, - vbytes: createAverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern(this, 'block_vbytes'), + vbytes: createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern(this, 'block_vbytes'), fullness: { bps: create_1m1w1y24hHeightPattern(this, 'block_fullness_bps'), ratio: createMetricPattern1(this, 'block_fullness_ratio'), @@ -7475,7 +7412,7 @@ class BrkClient extends BrkClientBase { firstTxinindex: createMetricPattern19(this, 'first_txinindex'), firstTxoutindex: createMetricPattern19(this, 'first_txoutindex'), count: { - txCount: createAverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern(this, 'tx_count'), + txCount: createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern(this, 'tx_count'), isCoinbase: createMetricPattern19(this, 'is_coinbase'), }, size: { @@ -7489,9 +7426,9 @@ class BrkClient extends BrkClientBase { feeRate: create_6bBlockTxindexPattern(this, 'fee_rate'), }, versions: { - v1: createCumulativeHeightSumPattern(this, 'tx_v1'), - v2: createCumulativeHeightSumPattern(this, 'tx_v2'), - v3: createCumulativeHeightSumPattern(this, 'tx_v3'), + v1: createCumulativeRawSumPattern(this, 'tx_v1'), + v2: createCumulativeRawSumPattern(this, 'tx_v2'), + v3: createCumulativeRawSumPattern(this, 'tx_v3'), }, volume: { sentSum: create_1m1w1y24hBtcCentsSatsUsdPattern(this, 'sent_sum'), @@ -7556,19 +7493,19 @@ class BrkClient extends BrkClientBase { p2msToTxindex: createMetricPattern25(this, 'txindex'), unknownToTxindex: createMetricPattern33(this, 'txindex'), count: { - p2a: createCumulativeHeightSumPattern(this, 'p2a_count'), - p2ms: createCumulativeHeightSumPattern(this, 'p2ms_count'), - p2pk33: createCumulativeHeightSumPattern(this, 'p2pk33_count'), - p2pk65: createCumulativeHeightSumPattern(this, 'p2pk65_count'), - p2pkh: createCumulativeHeightSumPattern(this, 'p2pkh_count'), - p2sh: createCumulativeHeightSumPattern(this, 'p2sh_count'), - p2tr: createCumulativeHeightSumPattern(this, 'p2tr_count'), - p2wpkh: createCumulativeHeightSumPattern(this, 'p2wpkh_count'), - p2wsh: createCumulativeHeightSumPattern(this, 'p2wsh_count'), - opreturn: createCumulativeHeightSumPattern(this, 'opreturn_count'), - emptyoutput: createCumulativeHeightSumPattern(this, 'emptyoutput_count'), - unknownoutput: createCumulativeHeightSumPattern(this, 'unknownoutput_count'), - segwit: createCumulativeHeightSumPattern(this, 'segwit_count'), + p2a: createCumulativeRawSumPattern(this, 'p2a_count'), + p2ms: createCumulativeRawSumPattern(this, 'p2ms_count'), + p2pk33: createCumulativeRawSumPattern(this, 'p2pk33_count'), + p2pk65: createCumulativeRawSumPattern(this, 'p2pk65_count'), + p2pkh: createCumulativeRawSumPattern(this, 'p2pkh_count'), + p2sh: createCumulativeRawSumPattern(this, 'p2sh_count'), + p2tr: createCumulativeRawSumPattern(this, 'p2tr_count'), + p2wpkh: createCumulativeRawSumPattern(this, 'p2wpkh_count'), + p2wsh: createCumulativeRawSumPattern(this, 'p2wsh_count'), + opreturn: createCumulativeRawSumPattern(this, 'opreturn_count'), + emptyoutput: createCumulativeRawSumPattern(this, 'emptyoutput_count'), + unknownoutput: createCumulativeRawSumPattern(this, 'unknownoutput_count'), + segwit: createCumulativeRawSumPattern(this, 'segwit_count'), }, value: { opreturn: createBaseCumulativePattern(this, 'opreturn_value'), @@ -7594,6 +7531,12 @@ class BrkClient extends BrkClientBase { feeDominance: create_1m1w1y24hBpsPercentRatioPattern(this, 'fee_dominance'), subsidyDominance: create_1m1w1y24hBpsPercentRatioPattern(this, 'subsidy_dominance'), subsidySma1y: createCentsUsdPattern(this, 'subsidy_sma_1y'), + feeRatioMultiple: { + _24h: createBpsRatioPattern(this, 'fee_ratio_multiple_24h'), + _1w: createBpsRatioPattern(this, 'fee_ratio_multiple_1w'), + _1m: createBpsRatioPattern(this, 'fee_ratio_multiple_1m'), + _1y: createBpsRatioPattern(this, 'fee_ratio_multiple_1y'), + }, }, hashrate: { hashRate: createMetricPattern1(this, 'hash_rate'), @@ -7615,8 +7558,8 @@ class BrkClient extends BrkClientBase { }, cointime: { activity: { - coinblocksCreated: createCumulativeHeightSumPattern(this, 'coinblocks_created'), - coinblocksStored: createCumulativeHeightSumPattern(this, 'coinblocks_stored'), + coinblocksCreated: createCumulativeRawSumPattern(this, 'coinblocks_created'), + coinblocksStored: createCumulativeRawSumPattern(this, 'coinblocks_stored'), liveliness: createMetricPattern1(this, 'liveliness'), vaultedness: createMetricPattern1(this, 'vaultedness'), activityToVaultednessRatio: createMetricPattern1(this, 'activity_to_vaultedness_ratio'), @@ -7626,10 +7569,10 @@ class BrkClient extends BrkClientBase { activeSupply: createBtcCentsSatsUsdPattern(this, 'active_supply'), }, value: { - valueDestroyed: createCumulativeHeightSumPattern(this, 'cointime_value_destroyed'), - valueCreated: createCumulativeHeightSumPattern(this, 'cointime_value_created'), - valueStored: createCumulativeHeightSumPattern(this, 'cointime_value_stored'), - vocdd: createCumulativeHeightSumPattern(this, 'vocdd'), + valueDestroyed: createCumulativeRawSumPattern(this, 'cointime_value_destroyed'), + valueCreated: createCumulativeRawSumPattern(this, 'cointime_value_created'), + valueStored: createCumulativeRawSumPattern(this, 'cointime_value_stored'), + vocdd: createCumulativeRawSumPattern(this, 'vocdd'), }, cap: { thermoCap: createCentsUsdPattern(this, 'thermo_cap'), @@ -7649,14 +7592,14 @@ class BrkClient extends BrkClientBase { cointimePriceRatio: createBpsPct1Pct2Pct5Pct95Pct98Pct99RatioSmaPattern(this, 'cointime_price_ratio'), }, adjusted: { - adjInflationRate: createBpsPercentRatioPattern(this, 'cointime_adj_inflation_rate'), - adjTxVelocityBtc: createMetricPattern1(this, 'cointime_adj_tx_velocity_btc'), - adjTxVelocityUsd: createMetricPattern1(this, 'cointime_adj_tx_velocity_usd'), + inflationRate: createBpsPercentRatioPattern(this, 'cointime_adj_inflation_rate'), + txVelocityBtc: createMetricPattern1(this, 'cointime_adj_tx_velocity_btc'), + txVelocityUsd: createMetricPattern1(this, 'cointime_adj_tx_velocity_usd'), }, reserveRisk: { + value: createMetricPattern1(this, 'reserve_risk'), vocddMedian1y: createMetricPattern18(this, 'vocdd_median_1y'), hodlBank: createMetricPattern18(this, 'hodl_bank'), - reserveRisk: createMetricPattern1(this, 'reserve_risk'), }, }, constants: { @@ -7818,6 +7761,12 @@ class BrkClient extends BrkClientBase { identity: createMetricPattern21(this, 'txoutindex'), }, }, + indicators: { + puellMultiple: createBpsRatioPattern(this, 'puell_multiple'), + nvt: createBpsRatioPattern(this, 'nvt'), + gini: createBpsPercentRatioPattern(this, 'gini'), + rhodlRatio: createBpsRatioPattern(this, 'rhodl_ratio'), + }, market: { ath: { price: createCentsSatsUsdPattern(this, 'price_ath'), @@ -8116,9 +8065,7 @@ class BrkClient extends BrkClientBase { from2026: createBpsPercentRatioPattern(this, 'dca_return_from_2026'), }, }, - indicators: { - puellMultiple: createBpsRatioPattern(this, 'puell_multiple'), - nvt: createBpsRatioPattern(this, 'nvt'), + technical: { rsi: { _24h: createAverageGainsLossesRsiStochPattern(this, 'rsi'), _1w: { @@ -8185,7 +8132,6 @@ class BrkClient extends BrkClientBase { histogram: createMetricPattern1(this, 'macd_histogram_1y'), }, }, - gini: createBpsPercentRatioPattern(this, 'gini'), }, }, pools: { @@ -8397,51 +8343,72 @@ class BrkClient extends BrkClientBase { }, utxoCohorts: { all: { - supply: createDeltaHalvedTotalPattern2(this, 'supply'), + supply: { + delta: createChangeRatePattern2(this, 'supply_delta'), + total: createBtcCentsSatsUsdPattern(this, 'supply'), + halved: createBtcCentsSatsUsdPattern(this, 'supply_halved'), + }, outputs: createUtxoPattern3(this, 'utxo_count'), - activity: createCoinblocksCoindaysDormancySentVelocityPattern(this, ''), + activity: createCoindaysDormancySentVelocityPattern(this, ''), realized: createCapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern(this, ''), costBasis: createInvestedMaxMinPercentilesPattern(this, ''), - unrealized: createGrossInvestedInvestorLossNetProfitSentimentPattern(this, ''), - relative: { - supply: { - inProfit: createRelPattern3(this, 'supply_in_profit_rel_to_own_supply'), - inLoss: createRelPattern3(this, 'supply_in_loss_rel_to_own_supply'), + unrealized: { + grossPnl: createCentsUsdPattern(this, 'unrealized_gross_pnl'), + investedCapital: createInPattern4(this, 'invested_capital_in'), + sentiment: createGreedNetPainPattern(this, ''), + investorCap: createInPattern2(this, 'investor_cap_in'), + loss: { + negative: createMetricPattern1(this, 'neg_unrealized_loss'), + raw: createCentsUsdPattern(this, 'unrealized_loss'), + sum: create_24hPattern(this, 'unrealized_loss_24h'), + supply: createBtcCentsRelSatsUsdPattern2(this, 'supply_in_loss'), + relToMarketCap: createBpsPercentRatioPattern(this, 'unrealized_loss_rel_to_market_cap'), + relToOwnGrossPnl: createBpsPercentRatioPattern(this, 'unrealized_loss_rel_to_own_gross_pnl'), }, - unrealized: { - profit: createRelPattern4(this, 'unrealized_profit_rel_to'), - loss: createRelPattern4(this, 'unrealized_loss_rel_to'), - netPnl: { - relToOwnGrossPnl: createBpsPercentRatioPattern(this, 'net_unrealized_pnl_rel_to_own_gross_pnl'), - }, + netPnl: { + cents: createMetricPattern1(this, 'net_unrealized_pnl_cents'), + usd: createMetricPattern1(this, 'net_unrealized_pnl'), + relToOwnGrossPnl: createBpsPercentRatioPattern(this, 'net_unrealized_pnl_rel_to_own_gross_pnl'), + }, + profit: { + raw: createCentsUsdPattern(this, 'unrealized_profit'), + sum: create_24hPattern(this, 'unrealized_profit_24h'), + supply: createBtcCentsRelSatsUsdPattern2(this, 'supply_in_profit'), + relToMarketCap: createBpsPercentRatioPattern(this, 'unrealized_profit_rel_to_market_cap'), + relToOwnGrossPnl: createBpsPercentRatioPattern(this, 'unrealized_profit_rel_to_own_gross_pnl'), }, }, }, sth: { realized: createCapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern(this, 'sth'), - supply: createDeltaHalvedTotalPattern2(this, 'sth_supply'), + supply: createDeltaHalvedRelTotalPattern2(this, 'sth_supply'), outputs: createUtxoPattern3(this, 'sth_utxo_count'), - activity: createCoinblocksCoindaysDormancySentVelocityPattern(this, 'sth'), + activity: createCoindaysDormancySentVelocityPattern(this, 'sth'), costBasis: createInvestedMaxMinPercentilesPattern(this, 'sth'), - unrealized: createGrossInvestedInvestorLossNetProfitSentimentPattern(this, 'sth'), - relative: createSupplyUnrealizedPattern2(this, 'sth'), + unrealized: createGrossInvestedInvestorLossNetProfitSentimentPattern2(this, 'sth'), }, lth: { - supply: createDeltaHalvedTotalPattern2(this, 'lth_supply'), + supply: createDeltaHalvedRelTotalPattern2(this, 'lth_supply'), outputs: createUtxoPattern3(this, 'lth_utxo_count'), - activity: createCoinblocksCoindaysDormancySentVelocityPattern(this, 'lth'), + activity: createCoindaysDormancySentVelocityPattern(this, 'lth'), realized: { profit: createCumulativeDistributionRawRelSumValuePattern(this, 'lth'), loss: createCapitulationCumulativeNegativeRawRelSumValuePattern(this, 'lth'), grossPnl: createRawSellSumPattern(this, 'lth'), netPnl: createChangeCumulativeDeltaRawRelSumPattern(this, 'lth_net'), sopr: { - valueCreated: createRawSumPattern3(this, 'lth_value_created'), - valueDestroyed: createRawSumPattern3(this, 'lth_value_destroyed'), + valueCreated: { + sum: create_1m1w1y24hPattern(this, 'lth_value_created'), + raw: createMetricPattern1(this, 'lth_value_created'), + }, + valueDestroyed: { + sum: create_1m1w1y24hPattern(this, 'lth_value_destroyed'), + raw: createMetricPattern1(this, 'lth_value_destroyed'), + }, ratio: create_1m1w1y24hPattern(this, 'lth_sopr'), }, sent: createInPattern3(this, 'lth_sent_in'), - peakRegret: createCumulativeHeightRelPattern(this, 'lth_realized_peak_regret'), + peakRegret: createCumulativeRawRelPattern(this, 'lth_realized_peak_regret'), investor: createCapLowerPriceUpperPattern(this, 'lth'), profitToLossRatio: create_1m1w1y24hPattern(this, 'lth_realized_profit_to_loss_ratio'), cap: createCentsDeltaRawRelUsdPattern(this, 'lth'), @@ -8451,98 +8418,97 @@ class BrkClient extends BrkClientBase { nupl: createBpsRatioPattern(this, 'lth_nupl_ratio'), }, costBasis: createInvestedMaxMinPercentilesPattern(this, 'lth'), - unrealized: createGrossInvestedInvestorLossNetProfitSentimentPattern(this, 'lth'), - relative: createSupplyUnrealizedPattern2(this, 'lth'), + unrealized: createGrossInvestedInvestorLossNetProfitSentimentPattern2(this, 'lth'), }, ageRange: { - upTo1h: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_under_1h_old'), - _1hTo1d: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_1h_to_1d_old'), - _1dTo1w: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_1d_to_1w_old'), - _1wTo1m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_1w_to_1m_old'), - _1mTo2m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_1m_to_2m_old'), - _2mTo3m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_2m_to_3m_old'), - _3mTo4m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_3m_to_4m_old'), - _4mTo5m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_4m_to_5m_old'), - _5mTo6m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_5m_to_6m_old'), - _6mTo1y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_6m_to_1y_old'), - _1yTo2y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_1y_to_2y_old'), - _2yTo3y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_2y_to_3y_old'), - _3yTo4y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_3y_to_4y_old'), - _4yTo5y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_4y_to_5y_old'), - _5yTo6y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_5y_to_6y_old'), - _6yTo7y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_6y_to_7y_old'), - _7yTo8y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_7y_to_8y_old'), - _8yTo10y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_8y_to_10y_old'), - _10yTo12y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_10y_to_12y_old'), - _12yTo15y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_12y_to_15y_old'), - from15y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern(this, 'utxos_over_15y_old'), + upTo1h: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_under_1h_old'), + _1hTo1d: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_1h_to_1d_old'), + _1dTo1w: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_1d_to_1w_old'), + _1wTo1m: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_1w_to_1m_old'), + _1mTo2m: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_1m_to_2m_old'), + _2mTo3m: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_2m_to_3m_old'), + _3mTo4m: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_3m_to_4m_old'), + _4mTo5m: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_4m_to_5m_old'), + _5mTo6m: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_5m_to_6m_old'), + _6mTo1y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_6m_to_1y_old'), + _1yTo2y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_1y_to_2y_old'), + _2yTo3y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_2y_to_3y_old'), + _3yTo4y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_3y_to_4y_old'), + _4yTo5y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_4y_to_5y_old'), + _5yTo6y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_5y_to_6y_old'), + _6yTo7y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_6y_to_7y_old'), + _7yTo8y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_7y_to_8y_old'), + _8yTo10y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_8y_to_10y_old'), + _10yTo12y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_10y_to_12y_old'), + _12yTo15y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_12y_to_15y_old'), + from15y: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_over_15y_old'), }, maxAge: { - _1w: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_1w_old'), - _1m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_1m_old'), - _2m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_2m_old'), - _3m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_3m_old'), - _4m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_4m_old'), - _5m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_5m_old'), - _6m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_6m_old'), - _1y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_1y_old'), - _2y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_2y_old'), - _3y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_3y_old'), - _4y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_4y_old'), - _5y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_5y_old'), - _6y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_6y_old'), - _7y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_7y_old'), - _8y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_8y_old'), - _10y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_10y_old'), - _12y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_12y_old'), - _15y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_under_15y_old'), + _1w: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_1w_old'), + _1m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_1m_old'), + _2m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_2m_old'), + _3m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_3m_old'), + _4m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_4m_old'), + _5m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_5m_old'), + _6m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_6m_old'), + _1y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_1y_old'), + _2y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_2y_old'), + _3y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_3y_old'), + _4y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_4y_old'), + _5y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_5y_old'), + _6y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_6y_old'), + _7y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_7y_old'), + _8y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_8y_old'), + _10y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_10y_old'), + _12y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_12y_old'), + _15y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_under_15y_old'), }, minAge: { - _1d: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_1d_old'), - _1w: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_1w_old'), - _1m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_1m_old'), - _2m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_2m_old'), - _3m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_3m_old'), - _4m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_4m_old'), - _5m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_5m_old'), - _6m: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_6m_old'), - _1y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_1y_old'), - _2y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_2y_old'), - _3y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_3y_old'), - _4y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_4y_old'), - _5y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_5y_old'), - _6y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_6y_old'), - _7y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_7y_old'), - _8y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_8y_old'), - _10y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_10y_old'), - _12y: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'utxos_over_12y_old'), + _1d: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_1d_old'), + _1w: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_1w_old'), + _1m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_1m_old'), + _2m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_2m_old'), + _3m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_3m_old'), + _4m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_4m_old'), + _5m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_5m_old'), + _6m: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_6m_old'), + _1y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_1y_old'), + _2y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_2y_old'), + _3y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_3y_old'), + _4y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_4y_old'), + _5y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_5y_old'), + _6y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_6y_old'), + _7y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_7y_old'), + _8y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_8y_old'), + _10y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_10y_old'), + _12y: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'utxos_over_12y_old'), }, epoch: { - _0: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'epoch_0'), - _1: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'epoch_1'), - _2: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'epoch_2'), - _3: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'epoch_3'), - _4: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'epoch_4'), + _0: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'epoch_0'), + _1: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'epoch_1'), + _2: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'epoch_2'), + _3: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'epoch_3'), + _4: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'epoch_4'), }, class: { - _2009: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2009'), - _2010: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2010'), - _2011: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2011'), - _2012: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2012'), - _2013: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2013'), - _2014: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2014'), - _2015: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2015'), - _2016: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2016'), - _2017: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2017'), - _2018: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2018'), - _2019: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2019'), - _2020: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2020'), - _2021: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2021'), - _2022: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2022'), - _2023: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2023'), - _2024: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2024'), - _2025: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2025'), - _2026: createActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(this, 'class_2026'), + _2009: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2009'), + _2010: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2010'), + _2011: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2011'), + _2012: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2012'), + _2013: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2013'), + _2014: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2014'), + _2015: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2015'), + _2016: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2016'), + _2017: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2017'), + _2018: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2018'), + _2019: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2019'), + _2020: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2020'), + _2021: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2021'), + _2022: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2022'), + _2023: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2023'), + _2024: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2024'), + _2025: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2025'), + _2026: createActivityOutputsRealizedSupplyUnrealizedPattern2(this, 'class_2026'), }, geAmount: { _1sat: createOutputsRealizedSupplyPattern(this, 'utxos_over_1sat'), @@ -8735,6 +8701,7 @@ class BrkClient extends BrkClientBase { _100kBtc: createAddrOutputsRealizedSupplyPattern(this, 'addrs_under_100k_btc'), }, }, + coinblocksDestroyed: createCumulativeRawPattern(this, 'coinblocks_destroyed'), addrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern(this, 'addr_count'), emptyAddrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern(this, 'empty_addr_count'), addressActivity: { @@ -8750,15 +8717,15 @@ class BrkClient extends BrkClientBase { }, totalAddrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern(this, 'total_addr_count'), newAddrCount: { - all: createHeightSumPattern(this, 'new_addr_count'), - p2pk65: createHeightSumPattern(this, 'p2pk65_new_addr_count'), - p2pk33: createHeightSumPattern(this, 'p2pk33_new_addr_count'), - p2pkh: createHeightSumPattern(this, 'p2pkh_new_addr_count'), - p2sh: createHeightSumPattern(this, 'p2sh_new_addr_count'), - p2wpkh: createHeightSumPattern(this, 'p2wpkh_new_addr_count'), - p2wsh: createHeightSumPattern(this, 'p2wsh_new_addr_count'), - p2tr: createHeightSumPattern(this, 'p2tr_new_addr_count'), - p2a: createHeightSumPattern(this, 'p2a_new_addr_count'), + all: createRawSumPattern3(this, 'new_addr_count'), + p2pk65: createRawSumPattern3(this, 'p2pk65_new_addr_count'), + p2pk33: createRawSumPattern3(this, 'p2pk33_new_addr_count'), + p2pkh: createRawSumPattern3(this, 'p2pkh_new_addr_count'), + p2sh: createRawSumPattern3(this, 'p2sh_new_addr_count'), + p2wpkh: createRawSumPattern3(this, 'p2wpkh_new_addr_count'), + p2wsh: createRawSumPattern3(this, 'p2wsh_new_addr_count'), + p2tr: createRawSumPattern3(this, 'p2tr_new_addr_count'), + p2a: createRawSumPattern3(this, 'p2a_new_addr_count'), }, delta: { all: createChangeRatePattern2(this, 'addr_count'), @@ -8788,6 +8755,7 @@ class BrkClient extends BrkClientBase { marketCap: createCentsUsdPattern(this, 'market_cap'), marketCapDelta: createChangeRatePattern4(this, 'market_cap_delta'), marketMinusRealizedCapGrowthRate: create_1m1w1y24hPattern(this, 'market_minus_realized_cap_growth_rate'), + hodledOrLostCoins: createBtcCentsSatsUsdPattern(this, 'hodled_or_lost_coins'), }, }; } diff --git a/packages/brk_client/brk_client/__init__.py b/packages/brk_client/brk_client/__init__.py index 57d09dcb2..97409c315 100644 --- a/packages/brk_client/brk_client/__init__.py +++ b/packages/brk_client/brk_client/__init__.py @@ -2156,7 +2156,7 @@ class CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern: self.mvrv: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'mvrv')) self.net_pnl: ChangeCumulativeDeltaRawRelSumPattern = ChangeCumulativeDeltaRawRelSumPattern(client, _m(acc, 'net')) self.nupl: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'nupl_ratio')) - self.peak_regret: CumulativeHeightRelPattern = CumulativeHeightRelPattern(client, _m(acc, 'realized_peak_regret')) + self.peak_regret: CumulativeRawRelPattern = CumulativeRawRelPattern(client, _m(acc, 'realized_peak_regret')) self.price: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'realized_price')) self.price_ratio: BpsPercentilesRatioStdPattern = BpsPercentilesRatioStdPattern(client, _m(acc, 'realized_price_ratio')) self.profit: CumulativeDistributionRawRelSumValuePattern = CumulativeDistributionRawRelSumValuePattern(client, acc) @@ -2217,14 +2217,13 @@ class AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern: self.rolling: AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) self.sum: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'sum')) -class AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern: +class AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.average: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'average')) self.cumulative: MetricPattern1[StoredU64] = MetricPattern1(client, _m(acc, 'cumulative')) - self.height: MetricPattern18[StoredU64] = MetricPattern18(client, acc) self.max: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'max')) self.median: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'median')) self.min: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'min')) @@ -2232,6 +2231,7 @@ class AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern: self.pct25: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'pct25')) self.pct75: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'pct75')) self.pct90: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'pct90')) + self.raw: MetricPattern1[StoredU64] = MetricPattern1(client, acc) self.sum: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'sum')) class AverageGainsLossesRsiStochPattern: @@ -2278,7 +2278,7 @@ class CapLossMvrvNetNuplPriceProfitSentSoprPattern: self.nupl: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'nupl_ratio')) self.price: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'realized_price')) self.price_ratio: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'realized_price_ratio')) - self.profit: CumulativeRawSumPattern = CumulativeRawSumPattern(client, _m(acc, 'realized_profit')) + self.profit: CumulativeRawSumPattern2 = CumulativeRawSumPattern2(client, _m(acc, 'realized_profit')) self.sent: InPattern = InPattern(client, _m(acc, 'sent_in')) self.sopr: RatioValuePattern = RatioValuePattern(client, acc) @@ -2436,42 +2436,43 @@ class CumulativeDistributionRawRelSumValuePattern: self.value_created: BaseSumPattern = BaseSumPattern(client, _m(acc, 'profit_value_created')) self.value_destroyed: BaseSumPattern = BaseSumPattern(client, _m(acc, 'profit_value_destroyed')) -class GrossInvestedInvestorLossNetProfitSentimentPattern: +class GrossInvestedInvestorLossNetProfitSentimentPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.gross_pnl: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'unrealized_gross_pnl')) - self.invested_capital: InPattern5 = InPattern5(client, _m(acc, 'invested_capital_in')) + self.invested_capital: InPattern4 = InPattern4(client, _m(acc, 'invested_capital_in')) self.investor_cap: InPattern2 = InPattern2(client, _m(acc, 'investor_cap_in')) - self.loss: NegativeRawSumSupplyPattern = NegativeRawSumSupplyPattern(client, acc) - self.net_pnl: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'net_unrealized_pnl')) - self.profit: RawSumSupplyPattern = RawSumSupplyPattern(client, acc) + self.loss: NegativeRawRelSumSupplyPattern2 = NegativeRawRelSumSupplyPattern2(client, acc) + self.net_pnl: CentsRelUsdPattern2 = CentsRelUsdPattern2(client, _m(acc, 'net_unrealized_pnl')) + self.profit: RawRelSumSupplyPattern2 = RawRelSumSupplyPattern2(client, acc) self.sentiment: GreedNetPainPattern = GreedNetPainPattern(client, acc) -class ActivityOutputsRealizedRelativeSupplyUnrealizedPattern: +class NegativeRawRelSumSupplyPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.activity: CoindaysSentPattern = CoindaysSentPattern(client, acc) - self.outputs: UtxoPattern2 = UtxoPattern2(client, _m(acc, 'utxo_count')) - self.realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern = CapLossMvrvNetNuplPriceProfitSentSoprPattern(client, acc) - self.relative: SupplyPattern = SupplyPattern(client, _m(acc, 'supply')) - self.supply: DeltaHalvedTotalPattern = DeltaHalvedTotalPattern(client, _m(acc, 'supply')) - self.unrealized: InvestedInvestorLossNetProfitPattern = InvestedInvestorLossNetProfitPattern(client, acc) + self.negative: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'neg_unrealized_loss')) + self.raw: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'unrealized_loss')) + self.rel_to_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'unrealized_loss_rel_to_market_cap')) + self.rel_to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'unrealized_loss_rel_to_own_gross_pnl')) + self.rel_to_own_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'unrealized_loss_rel_to_own_market_cap')) + self.sum: _24hPattern = _24hPattern(client, _m(acc, 'unrealized_loss_24h')) + self.supply: BtcCentsRelSatsUsdPattern3 = BtcCentsRelSatsUsdPattern3(client, _m(acc, 'supply_in_loss')) -class ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2: +class BtcCentsRelSatsUsdPattern3: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.activity: CoindaysSentPattern = CoindaysSentPattern(client, acc) - self.outputs: UtxoPattern2 = UtxoPattern2(client, _m(acc, 'utxo_count')) - self.realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern = CapLossMvrvNetNuplPriceProfitSentSoprPattern(client, acc) - self.relative: SupplyPattern = SupplyPattern(client, _m(acc, 'supply')) - self.supply: DeltaHalvedTotalPattern = DeltaHalvedTotalPattern(client, _m(acc, 'supply')) - self.unrealized: LossNetProfitPattern2 = LossNetProfitPattern2(client, acc) + self.btc: MetricPattern1[Bitcoin] = MetricPattern1(client, acc) + self.cents: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'cents')) + self.rel_to_circulating_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')) + self.rel_to_own_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_own_supply')) + self.sats: MetricPattern1[Sats] = MetricPattern1(client, _m(acc, 'sats')) + self.usd: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'usd')) class CapLowerPriceUpperPattern: """Pattern struct for repeated tree structure.""" @@ -2490,13 +2491,47 @@ class ChangeCumulativeDeltaRawRelSumPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.change_1m: RelPattern2 = RelPattern2(client, _m(acc, 'pnl_change_1m_rel_to')) + self.change_1m: RelPattern = RelPattern(client, _m(acc, 'pnl_change_1m_rel_to')) self.cumulative: MetricPattern1[CentsSigned] = MetricPattern1(client, _m(acc, 'realized_pnl_cumulative')) self.delta: ChangeRatePattern4 = ChangeRatePattern4(client, _m(acc, 'pnl_delta')) self.raw: MetricPattern1[CentsSigned] = MetricPattern1(client, _m(acc, 'realized_pnl')) self.rel_to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'realized_pnl_rel_to_realized_cap')) self.sum: _1m1w1y24hPattern[CentsSigned] = _1m1w1y24hPattern(client, _m(acc, 'realized_pnl')) +class RawRelSumSupplyPattern2: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.raw: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'unrealized_profit')) + self.rel_to_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'unrealized_profit_rel_to_market_cap')) + self.rel_to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'unrealized_profit_rel_to_own_gross_pnl')) + self.rel_to_own_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'unrealized_profit_rel_to_own_market_cap')) + self.sum: _24hPattern = _24hPattern(client, _m(acc, 'unrealized_profit_24h')) + self.supply: BtcCentsRelSatsUsdPattern3 = BtcCentsRelSatsUsdPattern3(client, _m(acc, 'supply_in_profit')) + +class ActivityOutputsRealizedSupplyUnrealizedPattern: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.activity: CoindaysSentPattern = CoindaysSentPattern(client, acc) + self.outputs: UtxoPattern2 = UtxoPattern2(client, _m(acc, 'utxo_count')) + self.realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern = CapLossMvrvNetNuplPriceProfitSentSoprPattern(client, acc) + self.supply: DeltaHalvedRelTotalPattern = DeltaHalvedRelTotalPattern(client, _m(acc, 'supply')) + self.unrealized: InvestedInvestorLossNetProfitPattern = InvestedInvestorLossNetProfitPattern(client, acc) + +class ActivityOutputsRealizedSupplyUnrealizedPattern2: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.activity: CoindaysSentPattern = CoindaysSentPattern(client, acc) + self.outputs: UtxoPattern2 = UtxoPattern2(client, _m(acc, 'utxo_count')) + self.realized: CapLossMvrvNetNuplPriceProfitSentSoprPattern = CapLossMvrvNetNuplPriceProfitSentSoprPattern(client, acc) + self.supply: DeltaHalvedRelTotalPattern = DeltaHalvedRelTotalPattern(client, _m(acc, 'supply')) + self.unrealized: LossNetProfitPattern = LossNetProfitPattern(client, acc) + class AddrOutputsRealizedSupplyPattern: """Pattern struct for repeated tree structure.""" @@ -2508,26 +2543,26 @@ class AddrOutputsRealizedSupplyPattern: self.realized: CapLossMvrvNuplPriceProfitSoprPattern = CapLossMvrvNuplPriceProfitSoprPattern(client, acc) self.supply: HalvedTotalPattern = HalvedTotalPattern(client, _m(acc, 'supply')) -class BtcCentsSatsSumUsdPattern2: +class BtcCentsRelSatsUsdPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.btc: MetricPattern1[Bitcoin] = MetricPattern1(client, acc) self.cents: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'cents')) + self.rel_to_circulating_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')) self.sats: MetricPattern1[Sats] = MetricPattern1(client, _m(acc, 'sats')) - self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, acc) self.usd: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'usd')) -class BtcCentsSatsSumUsdPattern: +class BtcCentsRelSatsUsdPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.btc: MetricPattern1[Bitcoin] = MetricPattern1(client, acc) self.cents: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'cents')) + self.rel_to_own_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_own_supply')) self.sats: MetricPattern1[Sats] = MetricPattern1(client, _m(acc, 'sats')) - self.sum: _24hPattern3 = _24hPattern3(client, _m(acc, '24h')) self.usd: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'usd')) class CentsDeltaRawRelUsdPattern: @@ -2541,17 +2576,6 @@ class CentsDeltaRawRelUsdPattern: self.rel_to_own_mcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'realized_cap_rel_to_own_market_cap')) self.usd: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'realized_cap')) -class CoinblocksCoindaysDormancySentVelocityPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.coinblocks_destroyed: CumulativeRawPattern = CumulativeRawPattern(client, _m(acc, 'coinblocks_destroyed')) - self.coindays_destroyed: CumulativeRawSumPattern2 = CumulativeRawSumPattern2(client, _m(acc, 'coindays_destroyed')) - self.dormancy: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'dormancy')) - self.sent: RawSumPattern3[Sats] = RawSumPattern3(client, _m(acc, 'sent')) - self.velocity: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'velocity')) - class EmaHistogramLineSignalPattern: """Pattern struct for repeated tree structure.""" @@ -2585,17 +2609,6 @@ class PhsReboundThsPattern: self.ths: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'ths')) self.ths_min: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'ths_min')) -class RatioValuePattern2: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, _m(acc, 'sopr')) - self.value_created: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'value_created')) - self.value_created_sum: _1m1w1y24hPattern[Cents] = _1m1w1y24hPattern(client, _m(acc, 'value_created')) - self.value_destroyed: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'value_destroyed')) - self.value_destroyed_sum: _1m1w1y24hPattern[Cents] = _1m1w1y24hPattern(client, _m(acc, 'value_destroyed')) - class _1m1w1y24hHeightPattern(Generic[T]): """Pattern struct for repeated tree structure.""" @@ -2717,6 +2730,26 @@ class BtcCentsSatsUsdPattern: self.sats: MetricPattern1[Sats] = MetricPattern1(client, _m(acc, 'sats')) self.usd: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'usd')) +class CentsRelUsdPattern2: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.cents: MetricPattern1[CentsSigned] = MetricPattern1(client, _m(acc, 'cents')) + self.rel_to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_own_gross_pnl')) + self.rel_to_own_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_own_market_cap')) + self.usd: MetricPattern1[Dollars] = MetricPattern1(client, acc) + +class CoindaysDormancySentVelocityPattern: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.coindays_destroyed: CumulativeRawSumPattern[StoredF64] = CumulativeRawSumPattern(client, _m(acc, 'coindays_destroyed')) + self.dormancy: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'dormancy')) + self.sent: RawSumPattern3[Sats] = RawSumPattern3(client, _m(acc, 'sent')) + self.velocity: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'velocity')) + class CumulativeNegativeRawSumPattern: """Pattern struct for repeated tree structure.""" @@ -2727,6 +2760,26 @@ class CumulativeNegativeRawSumPattern: self.raw: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'realized_loss')) self.sum: _24hPattern = _24hPattern(client, _m(acc, 'realized_loss_24h')) +class DeltaHalvedRelTotalPattern: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.delta: ChangeRatePattern = ChangeRatePattern(client, _m(acc, 'delta')) + self.halved: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'halved')) + self.rel_to_circulating_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')) + self.total: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc) + +class DeltaHalvedRelTotalPattern2: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.delta: ChangeRatePattern2 = ChangeRatePattern2(client, _m(acc, 'delta')) + self.halved: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'halved')) + self.rel_to_circulating_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')) + self.total: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc) + class InvestedMaxMinPercentilesPattern: """Pattern struct for repeated tree structure.""" @@ -2745,7 +2798,7 @@ class NegativeRawSumSupplyPattern: self.negative: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'neg_unrealized_loss')) self.raw: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'unrealized_loss')) self.sum: _24hPattern = _24hPattern(client, _m(acc, 'unrealized_loss_24h')) - self.supply: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'supply_in_loss')) + self.supply: BtcCentsRelSatsUsdPattern = BtcCentsRelSatsUsdPattern(client, _m(acc, 'supply_in_loss')) class OutputsRealizedSupplyUnrealizedPattern: """Pattern struct for repeated tree structure.""" @@ -2781,7 +2834,7 @@ class BlocksDominanceRewardsPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.blocks_mined: CumulativeHeightSumPattern[StoredU32] = CumulativeHeightSumPattern(client, _m(acc, 'blocks_mined')) + self.blocks_mined: CumulativeRawSumPattern[StoredU32] = CumulativeRawSumPattern(client, _m(acc, 'blocks_mined')) self.dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, _m(acc, 'dominance')) self.rewards: BaseCumulativeSumPattern = BaseCumulativeSumPattern(client, _m(acc, 'rewards')) @@ -2839,16 +2892,16 @@ class CentsSatsUsdPattern: self.sats: MetricPattern1[SatsFract] = MetricPattern1(client, _m(acc, 'sats')) self.usd: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'usd')) -class CumulativeHeightRelPattern: +class CumulativeRawRelPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.cumulative: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'cumulative')) - self.height: MetricPattern18[Cents] = MetricPattern18(client, acc) + self.raw: MetricPattern1[Cents] = MetricPattern1(client, acc) self.rel_to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_realized_cap')) -class CumulativeRawSumPattern: +class CumulativeRawSumPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -2857,33 +2910,6 @@ class CumulativeRawSumPattern: self.raw: CentsUsdPattern = CentsUsdPattern(client, acc) self.sum: _24hPattern = _24hPattern(client, _m(acc, '24h')) -class CumulativeRawSumPattern2: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.cumulative: MetricPattern1[StoredF64] = MetricPattern1(client, _m(acc, 'cumulative')) - self.raw: MetricPattern1[StoredF64] = MetricPattern1(client, acc) - self.sum: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, acc) - -class DeltaHalvedTotalPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.delta: ChangeRatePattern = ChangeRatePattern(client, _m(acc, 'delta')) - self.halved: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'halved')) - self.total: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc) - -class DeltaHalvedTotalPattern2: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.delta: ChangeRatePattern2 = ChangeRatePattern2(client, _m(acc, 'delta')) - self.halved: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'halved')) - self.total: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc) - class GreedNetPainPattern: """Pattern struct for repeated tree structure.""" @@ -2893,25 +2919,7 @@ class GreedNetPainPattern: self.net: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'net_sentiment')) self.pain_index: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'pain_index')) -class InRelPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.in_loss: RelPattern = RelPattern(client, _m(acc, 'in_loss_rel_to_circulating_supply')) - self.in_profit: RelPattern = RelPattern(client, _m(acc, 'in_profit_rel_to_circulating_supply')) - self.rel_to_circulating_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')) - -class InRelPattern2: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.in_loss: RelPattern6 = RelPattern6(client, _m(acc, 'in_loss_rel_to')) - self.in_profit: RelPattern6 = RelPattern6(client, _m(acc, 'in_profit_rel_to')) - self.rel_to_circulating_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')) - -class LossNetProfitPattern2: +class LossNetProfitPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -2920,15 +2928,6 @@ class LossNetProfitPattern2: self.net_pnl: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'net_unrealized_pnl')) self.profit: RawSumSupplyPattern = RawSumSupplyPattern(client, acc) -class LossNetProfitPattern3: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.loss: RelPattern7 = RelPattern7(client, _m(acc, 'unrealized_loss_rel_to')) - self.net_pnl: RelPattern8 = RelPattern8(client, _m(acc, 'net_unrealized_pnl_rel_to_own')) - self.profit: RelPattern7 = RelPattern7(client, _m(acc, 'unrealized_profit_rel_to')) - class OutputsRealizedSupplyPattern: """Pattern struct for repeated tree structure.""" @@ -2938,6 +2937,15 @@ class OutputsRealizedSupplyPattern: self.realized: CapLossMvrvNuplPriceProfitSoprPattern = CapLossMvrvNuplPriceProfitSoprPattern(client, acc) self.supply: HalvedTotalPattern = HalvedTotalPattern(client, _m(acc, 'supply')) +class RatioValuePattern2: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, _m(acc, 'sopr')) + self.value_created: BaseSumPattern = BaseSumPattern(client, _m(acc, 'value_created')) + self.value_destroyed: BaseSumPattern = BaseSumPattern(client, _m(acc, 'value_destroyed')) + class RatioValuePattern: """Pattern struct for repeated tree structure.""" @@ -2963,16 +2971,16 @@ class RawSumSupplyPattern: """Create pattern node with accumulated metric name.""" self.raw: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'unrealized_profit')) self.sum: _24hPattern = _24hPattern(client, _m(acc, 'unrealized_profit_24h')) - self.supply: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'supply_in_profit')) + self.supply: BtcCentsRelSatsUsdPattern = BtcCentsRelSatsUsdPattern(client, _m(acc, 'supply_in_profit')) -class RelPattern7: +class RawSumSupplyPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.rel_to_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'market_cap')) - self.rel_to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'own_gross_pnl')) - self.rel_to_own_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'own_market_cap')) + self.raw: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'unrealized_profit')) + self.sum: _24hPattern = _24hPattern(client, _m(acc, 'unrealized_profit_24h')) + self.supply: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'supply_in_profit')) class _6bBlockTxindexPattern(Generic[T]): """Pattern struct for repeated tree structure.""" @@ -2983,13 +2991,13 @@ class _6bBlockTxindexPattern(Generic[T]): self.block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern[T] = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) self.txindex: MetricPattern19[T] = MetricPattern19(client, acc) -class CumulativeHeightSumPattern(Generic[T]): +class CumulativeRawSumPattern(Generic[T]): """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.cumulative: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'cumulative')) - self.height: MetricPattern18[T] = MetricPattern18(client, acc) + self.raw: MetricPattern1[T] = MetricPattern1(client, acc) self.sum: _1m1w1y24hPattern[T] = _1m1w1y24hPattern(client, acc) class BaseCumulativePattern: @@ -3013,7 +3021,7 @@ class BlocksDominancePattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.blocks_mined: CumulativeHeightPattern = CumulativeHeightPattern(client, _m(acc, 'blocks_mined')) + self.blocks_mined: CumulativeRawPattern[StoredU32] = CumulativeRawPattern(client, _m(acc, 'blocks_mined')) self.dominance: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'dominance')) class BpsRatioPattern: @@ -3072,22 +3080,6 @@ class CoindaysSentPattern: self.coindays_destroyed: RawSumPattern2[StoredF64] = RawSumPattern2(client, _m(acc, 'coindays_destroyed')) self.sent: RawSumPattern2[Sats] = RawSumPattern2(client, _m(acc, 'sent')) -class CumulativeRawPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.cumulative: MetricPattern1[StoredF64] = MetricPattern1(client, _m(acc, 'cumulative')) - self.raw: MetricPattern1[StoredF64] = MetricPattern1(client, acc) - -class CumulativeHeightPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.cumulative: MetricPattern1[StoredU32] = MetricPattern1(client, _m(acc, 'cumulative')) - self.height: MetricPattern18[StoredU32] = MetricPattern18(client, acc) - class HalvedTotalPattern: """Pattern struct for repeated tree structure.""" @@ -3096,31 +3088,7 @@ class HalvedTotalPattern: self.halved: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, _m(acc, 'halved')) self.total: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc) -class HeightSumPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.height: MetricPattern18[StoredU64] = MetricPattern18(client, acc) - self.sum: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'sum')) - -class InPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.in_loss: BtcCentsSatsSumUsdPattern = BtcCentsSatsSumUsdPattern(client, _m(acc, 'loss')) - self.in_profit: BtcCentsSatsSumUsdPattern = BtcCentsSatsSumUsdPattern(client, _m(acc, 'profit')) - -class InPattern3: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.in_loss: BtcCentsSatsSumUsdPattern2 = BtcCentsSatsSumUsdPattern2(client, _m(acc, 'loss')) - self.in_profit: BtcCentsSatsSumUsdPattern2 = BtcCentsSatsSumUsdPattern2(client, _m(acc, 'profit')) - -class InPattern5: +class InPattern4: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -3136,13 +3104,29 @@ class InPattern2: self.in_loss: RawPattern[CentsSats] = RawPattern(client, _m(acc, 'loss_raw')) self.in_profit: RawPattern[CentsSats] = RawPattern(client, _m(acc, 'profit_raw')) +class InPattern: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.in_loss: RawSumPattern4 = RawSumPattern4(client, _m(acc, 'loss')) + self.in_profit: RawSumPattern4 = RawSumPattern4(client, _m(acc, 'profit')) + +class InPattern3: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.in_loss: RawSumPattern5 = RawSumPattern5(client, _m(acc, 'loss')) + self.in_profit: RawSumPattern5 = RawSumPattern5(client, _m(acc, 'profit')) + class LossProfitPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.loss: RawSumSupplyPattern = RawSumSupplyPattern(client, acc) - self.profit: RawSumSupplyPattern = RawSumSupplyPattern(client, acc) + self.loss: RawSumSupplyPattern2 = RawSumSupplyPattern2(client, acc) + self.profit: RawSumSupplyPattern2 = RawSumSupplyPattern2(client, acc) class PriceValuePattern: """Pattern struct for repeated tree structure.""" @@ -3152,6 +3136,22 @@ class PriceValuePattern: self.price: CentsSatsUsdPattern = CentsSatsUsdPattern(client, acc) self.value: MetricPattern1[StoredF32] = MetricPattern1(client, acc) +class RawSumPattern5: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.raw: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc) + self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, acc) + +class RawSumPattern4: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.raw: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, acc) + self.sum: _24hPattern3 = _24hPattern3(client, _m(acc, '24h')) + class RawSumPattern: """Pattern struct for repeated tree structure.""" @@ -3168,23 +3168,7 @@ class RealizedSupplyPattern: self.realized_cap: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'realized_cap')) self.supply: MetricPattern1[Sats] = MetricPattern1(client, _m(acc, 'supply')) -class RelPattern6: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.rel_to_circulating_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'circulating_supply')) - self.rel_to_own_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'own_supply')) - -class RelPattern4: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.rel_to_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'market_cap')) - self.rel_to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'own_gross_pnl')) - -class RelPattern2: +class RelPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -3192,14 +3176,6 @@ class RelPattern2: self.rel_to_mcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'market_cap')) self.rel_to_rcap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'realized_cap')) -class RelPattern8: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.rel_to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'gross_pnl')) - self.rel_to_own_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, _m(acc, 'market_cap')) - class SdSmaPattern: """Pattern struct for repeated tree structure.""" @@ -3208,14 +3184,6 @@ class SdSmaPattern: self.sd: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'sd_1y')) self.sma: MetricPattern1[StoredF32] = MetricPattern1(client, _m(acc, 'sma_1y')) -class SupplyUnrealizedPattern2: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.supply: InRelPattern2 = InRelPattern2(client, _m(acc, 'supply')) - self.unrealized: LossNetProfitPattern3 = LossNetProfitPattern3(client, acc) - class UtxoPattern2: """Pattern struct for repeated tree structure.""" @@ -3240,13 +3208,21 @@ class ValuePattern: self.value_created: RawSumPattern2[Cents] = RawSumPattern2(client, _m(acc, 'created')) self.value_destroyed: RawSumPattern2[Cents] = RawSumPattern2(client, _m(acc, 'destroyed')) +class CumulativeRawPattern(Generic[T]): + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated metric name.""" + self.cumulative: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'cumulative')) + self.raw: MetricPattern1[T] = MetricPattern1(client, acc) + class RawSumPattern3(Generic[T]): """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.raw: MetricPattern1[T] = MetricPattern1(client, acc) - self.sum: _1m1w1y24hPattern[T] = _1m1w1y24hPattern(client, acc) + self.sum: _1m1w1y24hPattern[T] = _1m1w1y24hPattern(client, _m(acc, 'sum')) class RawSumPattern2(Generic[T]): """Pattern struct for repeated tree structure.""" @@ -3284,27 +3260,6 @@ class _24hPattern: """Create pattern node with accumulated metric name.""" self._24h: CentsUsdPattern = CentsUsdPattern(client, acc) -class RelPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.rel_to_circulating_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, acc) - -class RelPattern3: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.rel_to_own_supply: BpsPercentRatioPattern = BpsPercentRatioPattern(client, acc) - -class SupplyPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated metric name.""" - self.supply: InRelPattern = InRelPattern(client, acc) - class UtxoPattern: """Pattern struct for repeated tree structure.""" @@ -3391,7 +3346,7 @@ class MetricsTree_Blocks_Count: def __init__(self, client: BrkClientBase, base_path: str = ''): self.block_count_target: MetricPattern1[StoredU64] = MetricPattern1(client, 'block_count_target') - self.block_count: CumulativeHeightSumPattern[StoredU32] = CumulativeHeightSumPattern(client, 'block_count') + self.block_count: CumulativeRawSumPattern[StoredU32] = CumulativeRawSumPattern(client, 'block_count') class MetricsTree_Blocks_Lookback: """Metrics tree node.""" @@ -3470,14 +3425,14 @@ class MetricsTree_Blocks: self.lookback: MetricsTree_Blocks_Lookback = MetricsTree_Blocks_Lookback(client) self.interval: _1m1w1y24hHeightPattern[Timestamp] = _1m1w1y24hHeightPattern(client, 'block_interval') self.halving: MetricsTree_Blocks_Halving = MetricsTree_Blocks_Halving(client) - self.vbytes: AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, 'block_vbytes') + self.vbytes: AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern = AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern(client, 'block_vbytes') self.fullness: MetricsTree_Blocks_Fullness = MetricsTree_Blocks_Fullness(client) class MetricsTree_Transactions_Count: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.tx_count: AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, 'tx_count') + self.tx_count: AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern = AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RawSumPattern(client, 'tx_count') self.is_coinbase: MetricPattern19[StoredBool] = MetricPattern19(client, 'is_coinbase') class MetricsTree_Transactions_Size: @@ -3500,9 +3455,9 @@ class MetricsTree_Transactions_Versions: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.v1: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'tx_v1') - self.v2: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'tx_v2') - self.v3: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'tx_v3') + self.v1: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'tx_v1') + self.v2: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'tx_v2') + self.v3: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'tx_v3') class MetricsTree_Transactions_Volume: """Metrics tree node.""" @@ -3604,19 +3559,19 @@ class MetricsTree_Scripts_Count: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.p2a: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'p2a_count') - self.p2ms: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'p2ms_count') - self.p2pk33: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'p2pk33_count') - self.p2pk65: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'p2pk65_count') - self.p2pkh: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'p2pkh_count') - self.p2sh: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'p2sh_count') - self.p2tr: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'p2tr_count') - self.p2wpkh: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'p2wpkh_count') - self.p2wsh: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'p2wsh_count') - self.opreturn: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'opreturn_count') - self.emptyoutput: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'emptyoutput_count') - self.unknownoutput: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'unknownoutput_count') - self.segwit: CumulativeHeightSumPattern[StoredU64] = CumulativeHeightSumPattern(client, 'segwit_count') + self.p2a: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'p2a_count') + self.p2ms: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'p2ms_count') + self.p2pk33: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'p2pk33_count') + self.p2pk65: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'p2pk65_count') + self.p2pkh: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'p2pkh_count') + self.p2sh: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'p2sh_count') + self.p2tr: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'p2tr_count') + self.p2wpkh: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'p2wpkh_count') + self.p2wsh: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'p2wsh_count') + self.opreturn: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'opreturn_count') + self.emptyoutput: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'emptyoutput_count') + self.unknownoutput: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'unknownoutput_count') + self.segwit: CumulativeRawSumPattern[StoredU64] = CumulativeRawSumPattern(client, 'segwit_count') class MetricsTree_Scripts_Value: """Metrics tree node.""" @@ -3658,6 +3613,15 @@ class MetricsTree_Mining_Rewards_Fees: self._1m: AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 = AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(client, 'fees_1m') self._1y: AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 = AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(client, 'fees_1y') +class MetricsTree_Mining_Rewards_FeeRatioMultiple: + """Metrics tree node.""" + + def __init__(self, client: BrkClientBase, base_path: str = ''): + self._24h: BpsRatioPattern = BpsRatioPattern(client, 'fee_ratio_multiple_24h') + self._1w: BpsRatioPattern = BpsRatioPattern(client, 'fee_ratio_multiple_1w') + self._1m: BpsRatioPattern = BpsRatioPattern(client, 'fee_ratio_multiple_1m') + self._1y: BpsRatioPattern = BpsRatioPattern(client, 'fee_ratio_multiple_1y') + class MetricsTree_Mining_Rewards: """Metrics tree node.""" @@ -3669,6 +3633,7 @@ class MetricsTree_Mining_Rewards: self.fee_dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, 'fee_dominance') self.subsidy_dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, 'subsidy_dominance') self.subsidy_sma_1y: CentsUsdPattern = CentsUsdPattern(client, 'subsidy_sma_1y') + self.fee_ratio_multiple: MetricsTree_Mining_Rewards_FeeRatioMultiple = MetricsTree_Mining_Rewards_FeeRatioMultiple(client) class MetricsTree_Mining_Hashrate_HashRateSma: """Metrics tree node.""" @@ -3708,8 +3673,8 @@ class MetricsTree_Cointime_Activity: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.coinblocks_created: CumulativeHeightSumPattern[StoredF64] = CumulativeHeightSumPattern(client, 'coinblocks_created') - self.coinblocks_stored: CumulativeHeightSumPattern[StoredF64] = CumulativeHeightSumPattern(client, 'coinblocks_stored') + self.coinblocks_created: CumulativeRawSumPattern[StoredF64] = CumulativeRawSumPattern(client, 'coinblocks_created') + self.coinblocks_stored: CumulativeRawSumPattern[StoredF64] = CumulativeRawSumPattern(client, 'coinblocks_stored') self.liveliness: MetricPattern1[StoredF64] = MetricPattern1(client, 'liveliness') self.vaultedness: MetricPattern1[StoredF64] = MetricPattern1(client, 'vaultedness') self.activity_to_vaultedness_ratio: MetricPattern1[StoredF64] = MetricPattern1(client, 'activity_to_vaultedness_ratio') @@ -3725,10 +3690,10 @@ class MetricsTree_Cointime_Value: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.value_destroyed: CumulativeHeightSumPattern[StoredF64] = CumulativeHeightSumPattern(client, 'cointime_value_destroyed') - self.value_created: CumulativeHeightSumPattern[StoredF64] = CumulativeHeightSumPattern(client, 'cointime_value_created') - self.value_stored: CumulativeHeightSumPattern[StoredF64] = CumulativeHeightSumPattern(client, 'cointime_value_stored') - self.vocdd: CumulativeHeightSumPattern[StoredF64] = CumulativeHeightSumPattern(client, 'vocdd') + self.value_destroyed: CumulativeRawSumPattern[StoredF64] = CumulativeRawSumPattern(client, 'cointime_value_destroyed') + self.value_created: CumulativeRawSumPattern[StoredF64] = CumulativeRawSumPattern(client, 'cointime_value_created') + self.value_stored: CumulativeRawSumPattern[StoredF64] = CumulativeRawSumPattern(client, 'cointime_value_stored') + self.vocdd: CumulativeRawSumPattern[StoredF64] = CumulativeRawSumPattern(client, 'vocdd') class MetricsTree_Cointime_Cap: """Metrics tree node.""" @@ -3757,17 +3722,17 @@ class MetricsTree_Cointime_Adjusted: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.adj_inflation_rate: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'cointime_adj_inflation_rate') - self.adj_tx_velocity_btc: MetricPattern1[StoredF64] = MetricPattern1(client, 'cointime_adj_tx_velocity_btc') - self.adj_tx_velocity_usd: MetricPattern1[StoredF64] = MetricPattern1(client, 'cointime_adj_tx_velocity_usd') + self.inflation_rate: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'cointime_adj_inflation_rate') + self.tx_velocity_btc: MetricPattern1[StoredF64] = MetricPattern1(client, 'cointime_adj_tx_velocity_btc') + self.tx_velocity_usd: MetricPattern1[StoredF64] = MetricPattern1(client, 'cointime_adj_tx_velocity_usd') class MetricsTree_Cointime_ReserveRisk: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): + self.value: MetricPattern1[StoredF64] = MetricPattern1(client, 'reserve_risk') self.vocdd_median_1y: MetricPattern18[StoredF64] = MetricPattern18(client, 'vocdd_median_1y') self.hodl_bank: MetricPattern18[StoredF64] = MetricPattern18(client, 'hodl_bank') - self.reserve_risk: MetricPattern1[StoredF64] = MetricPattern1(client, 'reserve_risk') class MetricsTree_Cointime: """Metrics tree node.""" @@ -4074,6 +4039,15 @@ class MetricsTree_Indexes: self.txinindex: MetricsTree_Indexes_Txinindex = MetricsTree_Indexes_Txinindex(client) self.txoutindex: MetricsTree_Indexes_Txoutindex = MetricsTree_Indexes_Txoutindex(client) +class MetricsTree_Indicators: + """Metrics tree node.""" + + def __init__(self, client: BrkClientBase, base_path: str = ''): + self.puell_multiple: BpsRatioPattern = BpsRatioPattern(client, 'puell_multiple') + self.nvt: BpsRatioPattern = BpsRatioPattern(client, 'nvt') + self.gini: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'gini') + self.rhodl_ratio: BpsRatioPattern = BpsRatioPattern(client, 'rhodl_ratio') + class MetricsTree_Market_Ath: """Metrics tree node.""" @@ -4560,7 +4534,7 @@ class MetricsTree_Market_Dca: self.class_cost_basis: MetricsTree_Market_Dca_ClassCostBasis = MetricsTree_Market_Dca_ClassCostBasis(client) self.class_return: MetricsTree_Market_Dca_ClassReturn = MetricsTree_Market_Dca_ClassReturn(client) -class MetricsTree_Market_Indicators_Rsi_1w: +class MetricsTree_Market_Technical_Rsi_1w: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): @@ -4575,7 +4549,7 @@ class MetricsTree_Market_Indicators_Rsi_1w: self.stoch_rsi_k: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'rsi_stoch_k_1w') self.stoch_rsi_d: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'rsi_stoch_d_1w') -class MetricsTree_Market_Indicators_Rsi_1m: +class MetricsTree_Market_Technical_Rsi_1m: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): @@ -4590,7 +4564,7 @@ class MetricsTree_Market_Indicators_Rsi_1m: self.stoch_rsi_k: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'rsi_stoch_k_1m') self.stoch_rsi_d: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'rsi_stoch_d_1m') -class MetricsTree_Market_Indicators_Rsi_1y: +class MetricsTree_Market_Technical_Rsi_1y: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): @@ -4605,16 +4579,16 @@ class MetricsTree_Market_Indicators_Rsi_1y: self.stoch_rsi_k: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'rsi_stoch_k_1y') self.stoch_rsi_d: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'rsi_stoch_d_1y') -class MetricsTree_Market_Indicators_Rsi: +class MetricsTree_Market_Technical_Rsi: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): self._24h: AverageGainsLossesRsiStochPattern = AverageGainsLossesRsiStochPattern(client, 'rsi') - self._1w: MetricsTree_Market_Indicators_Rsi_1w = MetricsTree_Market_Indicators_Rsi_1w(client) - self._1m: MetricsTree_Market_Indicators_Rsi_1m = MetricsTree_Market_Indicators_Rsi_1m(client) - self._1y: MetricsTree_Market_Indicators_Rsi_1y = MetricsTree_Market_Indicators_Rsi_1y(client) + self._1w: MetricsTree_Market_Technical_Rsi_1w = MetricsTree_Market_Technical_Rsi_1w(client) + self._1m: MetricsTree_Market_Technical_Rsi_1m = MetricsTree_Market_Technical_Rsi_1m(client) + self._1y: MetricsTree_Market_Technical_Rsi_1y = MetricsTree_Market_Technical_Rsi_1y(client) -class MetricsTree_Market_Indicators_Macd_1w: +class MetricsTree_Market_Technical_Macd_1w: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): @@ -4624,7 +4598,7 @@ class MetricsTree_Market_Indicators_Macd_1w: self.signal: MetricPattern1[StoredF32] = MetricPattern1(client, 'macd_signal_1w') self.histogram: MetricPattern1[StoredF32] = MetricPattern1(client, 'macd_histogram_1w') -class MetricsTree_Market_Indicators_Macd_1m: +class MetricsTree_Market_Technical_Macd_1m: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): @@ -4634,7 +4608,7 @@ class MetricsTree_Market_Indicators_Macd_1m: self.signal: MetricPattern1[StoredF32] = MetricPattern1(client, 'macd_signal_1m') self.histogram: MetricPattern1[StoredF32] = MetricPattern1(client, 'macd_histogram_1m') -class MetricsTree_Market_Indicators_Macd_1y: +class MetricsTree_Market_Technical_Macd_1y: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): @@ -4644,27 +4618,24 @@ class MetricsTree_Market_Indicators_Macd_1y: self.signal: MetricPattern1[StoredF32] = MetricPattern1(client, 'macd_signal_1y') self.histogram: MetricPattern1[StoredF32] = MetricPattern1(client, 'macd_histogram_1y') -class MetricsTree_Market_Indicators_Macd: +class MetricsTree_Market_Technical_Macd: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): self._24h: EmaHistogramLineSignalPattern = EmaHistogramLineSignalPattern(client, 'macd') - self._1w: MetricsTree_Market_Indicators_Macd_1w = MetricsTree_Market_Indicators_Macd_1w(client) - self._1m: MetricsTree_Market_Indicators_Macd_1m = MetricsTree_Market_Indicators_Macd_1m(client) - self._1y: MetricsTree_Market_Indicators_Macd_1y = MetricsTree_Market_Indicators_Macd_1y(client) + self._1w: MetricsTree_Market_Technical_Macd_1w = MetricsTree_Market_Technical_Macd_1w(client) + self._1m: MetricsTree_Market_Technical_Macd_1m = MetricsTree_Market_Technical_Macd_1m(client) + self._1y: MetricsTree_Market_Technical_Macd_1y = MetricsTree_Market_Technical_Macd_1y(client) -class MetricsTree_Market_Indicators: +class MetricsTree_Market_Technical: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.puell_multiple: BpsRatioPattern = BpsRatioPattern(client, 'puell_multiple') - self.nvt: BpsRatioPattern = BpsRatioPattern(client, 'nvt') - self.rsi: MetricsTree_Market_Indicators_Rsi = MetricsTree_Market_Indicators_Rsi(client) + self.rsi: MetricsTree_Market_Technical_Rsi = MetricsTree_Market_Technical_Rsi(client) self.stoch_k: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'stoch_k') self.stoch_d: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'stoch_d') self.pi_cycle: BpsRatioPattern = BpsRatioPattern(client, 'pi_cycle') - self.macd: MetricsTree_Market_Indicators_Macd = MetricsTree_Market_Indicators_Macd(client) - self.gini: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'gini') + self.macd: MetricsTree_Market_Technical_Macd = MetricsTree_Market_Technical_Macd(client) class MetricsTree_Market: """Metrics tree node.""" @@ -4677,7 +4648,7 @@ class MetricsTree_Market: self.range: MetricsTree_Market_Range = MetricsTree_Market_Range(client) self.moving_average: MetricsTree_Market_MovingAverage = MetricsTree_Market_MovingAverage(client) self.dca: MetricsTree_Market_Dca = MetricsTree_Market_Dca(client) - self.indicators: MetricsTree_Market_Indicators = MetricsTree_Market_Indicators(client) + self.technical: MetricsTree_Market_Technical = MetricsTree_Market_Technical(client) class MetricsTree_Pools_Major: """Metrics tree node.""" @@ -4920,64 +4891,97 @@ class MetricsTree_Distribution_AddressesData: self.funded: MetricPattern34[FundedAddressData] = MetricPattern34(client, 'fundedaddressdata') self.empty: MetricPattern35[EmptyAddressData] = MetricPattern35(client, 'emptyaddressdata') -class MetricsTree_Distribution_UtxoCohorts_All_Relative_Supply: +class MetricsTree_Distribution_UtxoCohorts_All_Supply: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.in_profit: RelPattern3 = RelPattern3(client, 'supply_in_profit_rel_to_own_supply') - self.in_loss: RelPattern3 = RelPattern3(client, 'supply_in_loss_rel_to_own_supply') + self.delta: ChangeRatePattern2 = ChangeRatePattern2(client, 'supply_delta') + self.total: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'supply') + self.halved: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'supply_halved') -class MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized_NetPnl: +class MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Loss: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): + self.negative: MetricPattern1[Dollars] = MetricPattern1(client, 'neg_unrealized_loss') + self.raw: CentsUsdPattern = CentsUsdPattern(client, 'unrealized_loss') + self.sum: _24hPattern = _24hPattern(client, 'unrealized_loss_24h') + self.supply: BtcCentsRelSatsUsdPattern2 = BtcCentsRelSatsUsdPattern2(client, 'supply_in_loss') + self.rel_to_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'unrealized_loss_rel_to_market_cap') + self.rel_to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'unrealized_loss_rel_to_own_gross_pnl') + +class MetricsTree_Distribution_UtxoCohorts_All_Unrealized_NetPnl: + """Metrics tree node.""" + + def __init__(self, client: BrkClientBase, base_path: str = ''): + self.cents: MetricPattern1[CentsSigned] = MetricPattern1(client, 'net_unrealized_pnl_cents') + self.usd: MetricPattern1[Dollars] = MetricPattern1(client, 'net_unrealized_pnl') self.rel_to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'net_unrealized_pnl_rel_to_own_gross_pnl') -class MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized: +class MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Profit: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.profit: RelPattern4 = RelPattern4(client, 'unrealized_profit_rel_to') - self.loss: RelPattern4 = RelPattern4(client, 'unrealized_loss_rel_to') - self.net_pnl: MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized_NetPnl = MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized_NetPnl(client) + self.raw: CentsUsdPattern = CentsUsdPattern(client, 'unrealized_profit') + self.sum: _24hPattern = _24hPattern(client, 'unrealized_profit_24h') + self.supply: BtcCentsRelSatsUsdPattern2 = BtcCentsRelSatsUsdPattern2(client, 'supply_in_profit') + self.rel_to_market_cap: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'unrealized_profit_rel_to_market_cap') + self.rel_to_own_gross_pnl: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'unrealized_profit_rel_to_own_gross_pnl') -class MetricsTree_Distribution_UtxoCohorts_All_Relative: +class MetricsTree_Distribution_UtxoCohorts_All_Unrealized: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.supply: MetricsTree_Distribution_UtxoCohorts_All_Relative_Supply = MetricsTree_Distribution_UtxoCohorts_All_Relative_Supply(client) - self.unrealized: MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized = MetricsTree_Distribution_UtxoCohorts_All_Relative_Unrealized(client) + self.gross_pnl: CentsUsdPattern = CentsUsdPattern(client, 'unrealized_gross_pnl') + self.invested_capital: InPattern4 = InPattern4(client, 'invested_capital_in') + self.sentiment: GreedNetPainPattern = GreedNetPainPattern(client, '') + self.investor_cap: InPattern2 = InPattern2(client, 'investor_cap_in') + self.loss: MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Loss = MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Loss(client) + self.net_pnl: MetricsTree_Distribution_UtxoCohorts_All_Unrealized_NetPnl = MetricsTree_Distribution_UtxoCohorts_All_Unrealized_NetPnl(client) + self.profit: MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Profit = MetricsTree_Distribution_UtxoCohorts_All_Unrealized_Profit(client) class MetricsTree_Distribution_UtxoCohorts_All: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.supply: DeltaHalvedTotalPattern2 = DeltaHalvedTotalPattern2(client, 'supply') + self.supply: MetricsTree_Distribution_UtxoCohorts_All_Supply = MetricsTree_Distribution_UtxoCohorts_All_Supply(client) self.outputs: UtxoPattern3 = UtxoPattern3(client, 'utxo_count') - self.activity: CoinblocksCoindaysDormancySentVelocityPattern = CoinblocksCoindaysDormancySentVelocityPattern(client, '') + self.activity: CoindaysDormancySentVelocityPattern = CoindaysDormancySentVelocityPattern(client, '') self.realized: CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern = CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern(client, '') self.cost_basis: InvestedMaxMinPercentilesPattern = InvestedMaxMinPercentilesPattern(client, '') - self.unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern = GrossInvestedInvestorLossNetProfitSentimentPattern(client, '') - self.relative: MetricsTree_Distribution_UtxoCohorts_All_Relative = MetricsTree_Distribution_UtxoCohorts_All_Relative(client) + self.unrealized: MetricsTree_Distribution_UtxoCohorts_All_Unrealized = MetricsTree_Distribution_UtxoCohorts_All_Unrealized(client) class MetricsTree_Distribution_UtxoCohorts_Sth: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): self.realized: CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern = CapGrossInvestorLossMvrvNetNuplPeakPriceProfitSentSoprPattern(client, 'sth') - self.supply: DeltaHalvedTotalPattern2 = DeltaHalvedTotalPattern2(client, 'sth_supply') + self.supply: DeltaHalvedRelTotalPattern2 = DeltaHalvedRelTotalPattern2(client, 'sth_supply') self.outputs: UtxoPattern3 = UtxoPattern3(client, 'sth_utxo_count') - self.activity: CoinblocksCoindaysDormancySentVelocityPattern = CoinblocksCoindaysDormancySentVelocityPattern(client, 'sth') + self.activity: CoindaysDormancySentVelocityPattern = CoindaysDormancySentVelocityPattern(client, 'sth') self.cost_basis: InvestedMaxMinPercentilesPattern = InvestedMaxMinPercentilesPattern(client, 'sth') - self.unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern = GrossInvestedInvestorLossNetProfitSentimentPattern(client, 'sth') - self.relative: SupplyUnrealizedPattern2 = SupplyUnrealizedPattern2(client, 'sth') + self.unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern2 = GrossInvestedInvestorLossNetProfitSentimentPattern2(client, 'sth') + +class MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueCreated: + """Metrics tree node.""" + + def __init__(self, client: BrkClientBase, base_path: str = ''): + self.sum: _1m1w1y24hPattern[Cents] = _1m1w1y24hPattern(client, 'lth_value_created') + self.raw: MetricPattern1[Cents] = MetricPattern1(client, 'lth_value_created') + +class MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueDestroyed: + """Metrics tree node.""" + + def __init__(self, client: BrkClientBase, base_path: str = ''): + self.sum: _1m1w1y24hPattern[Cents] = _1m1w1y24hPattern(client, 'lth_value_destroyed') + self.raw: MetricPattern1[Cents] = MetricPattern1(client, 'lth_value_destroyed') class MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.value_created: RawSumPattern3[Cents] = RawSumPattern3(client, 'lth_value_created') - self.value_destroyed: RawSumPattern3[Cents] = RawSumPattern3(client, 'lth_value_destroyed') + self.value_created: MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueCreated = MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueCreated(client) + self.value_destroyed: MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueDestroyed = MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr_ValueDestroyed(client) self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'lth_sopr') class MetricsTree_Distribution_UtxoCohorts_Lth_Realized: @@ -4990,7 +4994,7 @@ class MetricsTree_Distribution_UtxoCohorts_Lth_Realized: self.net_pnl: ChangeCumulativeDeltaRawRelSumPattern = ChangeCumulativeDeltaRawRelSumPattern(client, 'lth_net') self.sopr: MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr = MetricsTree_Distribution_UtxoCohorts_Lth_Realized_Sopr(client) self.sent: InPattern3 = InPattern3(client, 'lth_sent_in') - self.peak_regret: CumulativeHeightRelPattern = CumulativeHeightRelPattern(client, 'lth_realized_peak_regret') + self.peak_regret: CumulativeRawRelPattern = CumulativeRawRelPattern(client, 'lth_realized_peak_regret') self.investor: CapLowerPriceUpperPattern = CapLowerPriceUpperPattern(client, 'lth') self.profit_to_loss_ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'lth_realized_profit_to_loss_ratio') self.cap: CentsDeltaRawRelUsdPattern = CentsDeltaRawRelUsdPattern(client, 'lth') @@ -5003,118 +5007,117 @@ class MetricsTree_Distribution_UtxoCohorts_Lth: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.supply: DeltaHalvedTotalPattern2 = DeltaHalvedTotalPattern2(client, 'lth_supply') + self.supply: DeltaHalvedRelTotalPattern2 = DeltaHalvedRelTotalPattern2(client, 'lth_supply') self.outputs: UtxoPattern3 = UtxoPattern3(client, 'lth_utxo_count') - self.activity: CoinblocksCoindaysDormancySentVelocityPattern = CoinblocksCoindaysDormancySentVelocityPattern(client, 'lth') + self.activity: CoindaysDormancySentVelocityPattern = CoindaysDormancySentVelocityPattern(client, 'lth') self.realized: MetricsTree_Distribution_UtxoCohorts_Lth_Realized = MetricsTree_Distribution_UtxoCohorts_Lth_Realized(client) self.cost_basis: InvestedMaxMinPercentilesPattern = InvestedMaxMinPercentilesPattern(client, 'lth') - self.unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern = GrossInvestedInvestorLossNetProfitSentimentPattern(client, 'lth') - self.relative: SupplyUnrealizedPattern2 = SupplyUnrealizedPattern2(client, 'lth') + self.unrealized: GrossInvestedInvestorLossNetProfitSentimentPattern2 = GrossInvestedInvestorLossNetProfitSentimentPattern2(client, 'lth') class MetricsTree_Distribution_UtxoCohorts_AgeRange: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.up_to_1h: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_under_1h_old') - self._1h_to_1d: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_1h_to_1d_old') - self._1d_to_1w: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_1d_to_1w_old') - self._1w_to_1m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_1w_to_1m_old') - self._1m_to_2m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_1m_to_2m_old') - self._2m_to_3m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_2m_to_3m_old') - self._3m_to_4m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_3m_to_4m_old') - self._4m_to_5m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_4m_to_5m_old') - self._5m_to_6m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_5m_to_6m_old') - self._6m_to_1y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_6m_to_1y_old') - self._1y_to_2y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_1y_to_2y_old') - self._2y_to_3y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_2y_to_3y_old') - self._3y_to_4y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_3y_to_4y_old') - self._4y_to_5y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_4y_to_5y_old') - self._5y_to_6y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_5y_to_6y_old') - self._6y_to_7y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_6y_to_7y_old') - self._7y_to_8y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_7y_to_8y_old') - self._8y_to_10y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_8y_to_10y_old') - self._10y_to_12y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_10y_to_12y_old') - self._12y_to_15y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_12y_to_15y_old') - self.from_15y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern(client, 'utxos_over_15y_old') + self.up_to_1h: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_under_1h_old') + self._1h_to_1d: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1h_to_1d_old') + self._1d_to_1w: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1d_to_1w_old') + self._1w_to_1m: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1w_to_1m_old') + self._1m_to_2m: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1m_to_2m_old') + self._2m_to_3m: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_2m_to_3m_old') + self._3m_to_4m: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_3m_to_4m_old') + self._4m_to_5m: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_4m_to_5m_old') + self._5m_to_6m: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_5m_to_6m_old') + self._6m_to_1y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_6m_to_1y_old') + self._1y_to_2y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_1y_to_2y_old') + self._2y_to_3y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_2y_to_3y_old') + self._3y_to_4y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_3y_to_4y_old') + self._4y_to_5y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_4y_to_5y_old') + self._5y_to_6y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_5y_to_6y_old') + self._6y_to_7y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_6y_to_7y_old') + self._7y_to_8y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_7y_to_8y_old') + self._8y_to_10y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_8y_to_10y_old') + self._10y_to_12y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_10y_to_12y_old') + self._12y_to_15y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_12y_to_15y_old') + self.from_15y: ActivityOutputsRealizedSupplyUnrealizedPattern = ActivityOutputsRealizedSupplyUnrealizedPattern(client, 'utxos_over_15y_old') class MetricsTree_Distribution_UtxoCohorts_MaxAge: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self._1w: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_1w_old') - self._1m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_1m_old') - self._2m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_2m_old') - self._3m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_3m_old') - self._4m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_4m_old') - self._5m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_5m_old') - self._6m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_6m_old') - self._1y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_1y_old') - self._2y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_2y_old') - self._3y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_3y_old') - self._4y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_4y_old') - self._5y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_5y_old') - self._6y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_6y_old') - self._7y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_7y_old') - self._8y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_8y_old') - self._10y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_10y_old') - self._12y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_12y_old') - self._15y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_under_15y_old') + self._1w: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_1w_old') + self._1m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_1m_old') + self._2m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_2m_old') + self._3m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_3m_old') + self._4m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_4m_old') + self._5m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_5m_old') + self._6m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_6m_old') + self._1y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_1y_old') + self._2y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_2y_old') + self._3y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_3y_old') + self._4y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_4y_old') + self._5y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_5y_old') + self._6y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_6y_old') + self._7y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_7y_old') + self._8y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_8y_old') + self._10y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_10y_old') + self._12y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_12y_old') + self._15y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_under_15y_old') class MetricsTree_Distribution_UtxoCohorts_MinAge: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self._1d: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_1d_old') - self._1w: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_1w_old') - self._1m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_1m_old') - self._2m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_2m_old') - self._3m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_3m_old') - self._4m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_4m_old') - self._5m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_5m_old') - self._6m: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_6m_old') - self._1y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_1y_old') - self._2y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_2y_old') - self._3y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_3y_old') - self._4y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_4y_old') - self._5y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_5y_old') - self._6y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_6y_old') - self._7y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_7y_old') - self._8y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_8y_old') - self._10y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_10y_old') - self._12y: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'utxos_over_12y_old') + self._1d: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_1d_old') + self._1w: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_1w_old') + self._1m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_1m_old') + self._2m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_2m_old') + self._3m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_3m_old') + self._4m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_4m_old') + self._5m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_5m_old') + self._6m: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_6m_old') + self._1y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_1y_old') + self._2y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_2y_old') + self._3y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_3y_old') + self._4y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_4y_old') + self._5y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_5y_old') + self._6y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_6y_old') + self._7y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_7y_old') + self._8y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_8y_old') + self._10y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_10y_old') + self._12y: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'utxos_over_12y_old') class MetricsTree_Distribution_UtxoCohorts_Epoch: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self._0: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'epoch_0') - self._1: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'epoch_1') - self._2: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'epoch_2') - self._3: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'epoch_3') - self._4: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'epoch_4') + self._0: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'epoch_0') + self._1: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'epoch_1') + self._2: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'epoch_2') + self._3: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'epoch_3') + self._4: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'epoch_4') class MetricsTree_Distribution_UtxoCohorts_Class: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self._2009: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2009') - self._2010: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2010') - self._2011: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2011') - self._2012: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2012') - self._2013: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2013') - self._2014: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2014') - self._2015: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2015') - self._2016: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2016') - self._2017: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2017') - self._2018: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2018') - self._2019: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2019') - self._2020: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2020') - self._2021: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2021') - self._2022: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2022') - self._2023: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2023') - self._2024: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2024') - self._2025: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2025') - self._2026: ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2 = ActivityOutputsRealizedRelativeSupplyUnrealizedPattern2(client, 'class_2026') + self._2009: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2009') + self._2010: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2010') + self._2011: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2011') + self._2012: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2012') + self._2013: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2013') + self._2014: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2014') + self._2015: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2015') + self._2016: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2016') + self._2017: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2017') + self._2018: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2018') + self._2019: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2019') + self._2020: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2020') + self._2021: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2021') + self._2022: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2022') + self._2023: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2023') + self._2024: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2024') + self._2025: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2025') + self._2026: ActivityOutputsRealizedSupplyUnrealizedPattern2 = ActivityOutputsRealizedSupplyUnrealizedPattern2(client, 'class_2026') class MetricsTree_Distribution_UtxoCohorts_GeAmount: """Metrics tree node.""" @@ -5388,15 +5391,15 @@ class MetricsTree_Distribution_NewAddrCount: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.all: HeightSumPattern = HeightSumPattern(client, 'new_addr_count') - self.p2pk65: HeightSumPattern = HeightSumPattern(client, 'p2pk65_new_addr_count') - self.p2pk33: HeightSumPattern = HeightSumPattern(client, 'p2pk33_new_addr_count') - self.p2pkh: HeightSumPattern = HeightSumPattern(client, 'p2pkh_new_addr_count') - self.p2sh: HeightSumPattern = HeightSumPattern(client, 'p2sh_new_addr_count') - self.p2wpkh: HeightSumPattern = HeightSumPattern(client, 'p2wpkh_new_addr_count') - self.p2wsh: HeightSumPattern = HeightSumPattern(client, 'p2wsh_new_addr_count') - self.p2tr: HeightSumPattern = HeightSumPattern(client, 'p2tr_new_addr_count') - self.p2a: HeightSumPattern = HeightSumPattern(client, 'p2a_new_addr_count') + self.all: RawSumPattern3[StoredU64] = RawSumPattern3(client, 'new_addr_count') + self.p2pk65: RawSumPattern3[StoredU64] = RawSumPattern3(client, 'p2pk65_new_addr_count') + self.p2pk33: RawSumPattern3[StoredU64] = RawSumPattern3(client, 'p2pk33_new_addr_count') + self.p2pkh: RawSumPattern3[StoredU64] = RawSumPattern3(client, 'p2pkh_new_addr_count') + self.p2sh: RawSumPattern3[StoredU64] = RawSumPattern3(client, 'p2sh_new_addr_count') + self.p2wpkh: RawSumPattern3[StoredU64] = RawSumPattern3(client, 'p2wpkh_new_addr_count') + self.p2wsh: RawSumPattern3[StoredU64] = RawSumPattern3(client, 'p2wsh_new_addr_count') + self.p2tr: RawSumPattern3[StoredU64] = RawSumPattern3(client, 'p2tr_new_addr_count') + self.p2a: RawSumPattern3[StoredU64] = RawSumPattern3(client, 'p2a_new_addr_count') class MetricsTree_Distribution_Delta: """Metrics tree node.""" @@ -5421,6 +5424,7 @@ class MetricsTree_Distribution: self.addresses_data: MetricsTree_Distribution_AddressesData = MetricsTree_Distribution_AddressesData(client) self.utxo_cohorts: MetricsTree_Distribution_UtxoCohorts = MetricsTree_Distribution_UtxoCohorts(client) self.address_cohorts: MetricsTree_Distribution_AddressCohorts = MetricsTree_Distribution_AddressCohorts(client) + self.coinblocks_destroyed: CumulativeRawPattern[StoredF64] = CumulativeRawPattern(client, 'coinblocks_destroyed') self.addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern = AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern(client, 'addr_count') self.empty_addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern = AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern(client, 'empty_addr_count') self.address_activity: MetricsTree_Distribution_AddressActivity = MetricsTree_Distribution_AddressActivity(client) @@ -5455,6 +5459,7 @@ class MetricsTree_Supply: self.market_cap: CentsUsdPattern = CentsUsdPattern(client, 'market_cap') self.market_cap_delta: ChangeRatePattern4 = ChangeRatePattern4(client, 'market_cap_delta') self.market_minus_realized_cap_growth_rate: _1m1w1y24hPattern[BasisPointsSigned32] = _1m1w1y24hPattern(client, 'market_minus_realized_cap_growth_rate') + self.hodled_or_lost_coins: BtcCentsSatsUsdPattern = BtcCentsSatsUsdPattern(client, 'hodled_or_lost_coins') class MetricsTree: """Metrics tree node.""" @@ -5471,6 +5476,7 @@ class MetricsTree: self.cointime: MetricsTree_Cointime = MetricsTree_Cointime(client) self.constants: MetricsTree_Constants = MetricsTree_Constants(client) self.indexes: MetricsTree_Indexes = MetricsTree_Indexes(client) + self.indicators: MetricsTree_Indicators = MetricsTree_Indicators(client) self.market: MetricsTree_Market = MetricsTree_Market(client) self.pools: MetricsTree_Pools = MetricsTree_Pools(client) self.prices: MetricsTree_Prices = MetricsTree_Prices(client)