Compare commits

...

24 Commits

Author SHA1 Message Date
nym21 aa61e327f6 release: v0.1.7 2026-02-07 22:51:30 +01:00
nym21 605a8b86b8 docs: update generated docs 2026-02-07 22:51:10 +01:00
nym21 ba60b7e4f6 computer: fixes 2026-02-07 22:38:25 +01:00
nym21 9cba9bfec4 computer: snapshot 2026-02-06 21:40:34 +01:00
nym21 ed10e21ee9 release: v0.1.6 2026-02-05 23:23:32 +01:00
nym21 9d8fcbe866 docs: update generated docs 2026-02-05 23:23:11 +01:00
nym21 afe4123a17 computer: distribution: feat cost basis distribution 2026-02-05 23:10:02 +01:00
nym21 bbba8f4373 website: safari fixes 2026-02-05 11:43:40 +01:00
nym21 897aab032e release: v0.1.5 2026-02-05 10:43:42 +01:00
nym21 5b2c83ae6e docs: update generated docs 2026-02-05 10:43:23 +01:00
nym21 dc15cceb1e website: chart improvements 2026-02-05 10:31:28 +01:00
nym21 b5c2d6ce9e changelog: updated 2026-02-05 00:34:56 +01:00
nym21 0eeda63abb clients: versions 2026-02-04 23:32:21 +01:00
nym21 d4933ae314 release: v0.1.4 2026-02-04 22:45:32 +01:00
nym21 53ffe0e06c docs: update generated docs 2026-02-04 22:45:13 +01:00
nym21 0433e3b256 global: snapshot 2026-02-04 22:27:44 +01:00
nym21 9b409799c8 website: snapshot 2026-02-04 20:30:56 +01:00
nym21 dd96709d18 website: snapshot 2026-02-04 18:33:25 +01:00
nym21 3818a72045 website: snapshot 2026-02-04 17:48:06 +01:00
nym21 0437ce1bb4 website: snapshot 2026-02-04 17:26:35 +01:00
nym21 0d5d7da70f website: snapshot 2026-02-03 23:43:52 +01:00
nym21 277a0eb6a7 website: snapshot 2026-02-03 11:03:51 +01:00
nym21 c02fc37491 website: snapshot 2026-02-03 10:00:36 +01:00
nym21 1d440be352 clients: bump versions 2026-02-03 00:49:56 +01:00
493 changed files with 14746 additions and 12029 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ name: Check outdated dependencies
on:
schedule:
- cron: '0 9 * * *'
- cron: "0 9 * * 1"
workflow_dispatch:
jobs:
+1
View File
@@ -24,6 +24,7 @@ _*
/oracle*
/playground
/*.txt
/*.csv
# Logs
*.log*
Generated
+47 -45
View File
@@ -334,7 +334,7 @@ dependencies = [
[[package]]
name = "brk"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_bencher",
"brk_bindgen",
@@ -358,7 +358,7 @@ dependencies = [
[[package]]
name = "brk_alloc"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"libmimalloc-sys",
"mimalloc",
@@ -366,7 +366,7 @@ dependencies = [
[[package]]
name = "brk_bencher"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_error",
"brk_logger",
@@ -376,14 +376,14 @@ dependencies = [
[[package]]
name = "brk_bencher_visualizer"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"plotters",
]
[[package]]
name = "brk_bindgen"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_cohort",
"brk_query",
@@ -396,7 +396,7 @@ dependencies = [
[[package]]
name = "brk_cli"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"anyhow",
"brk_alloc",
@@ -423,7 +423,7 @@ dependencies = [
[[package]]
name = "brk_client"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_cohort",
"brk_types",
@@ -434,7 +434,7 @@ dependencies = [
[[package]]
name = "brk_cohort"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_error",
"brk_traversable",
@@ -446,7 +446,7 @@ dependencies = [
[[package]]
name = "brk_computer"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"bitcoin",
"brk_alloc",
@@ -464,7 +464,6 @@ dependencies = [
"brk_types",
"color-eyre",
"derive_more",
"pco",
"rayon",
"rustc-hash",
"schemars",
@@ -476,13 +475,14 @@ dependencies = [
[[package]]
name = "brk_error"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"bitcoin",
"bitcoincore-rpc",
"fjall",
"jiff",
"minreq",
"pco",
"serde_json",
"thiserror",
"tokio",
@@ -491,7 +491,7 @@ dependencies = [
[[package]]
name = "brk_fetcher"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_error",
"brk_logger",
@@ -503,7 +503,7 @@ dependencies = [
[[package]]
name = "brk_indexer"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"bitcoin",
"brk_alloc",
@@ -528,7 +528,7 @@ dependencies = [
[[package]]
name = "brk_iterator"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_error",
"brk_reader",
@@ -538,7 +538,7 @@ dependencies = [
[[package]]
name = "brk_logger"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"jiff",
"owo-colors",
@@ -549,7 +549,7 @@ dependencies = [
[[package]]
name = "brk_mempool"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_error",
"brk_logger",
@@ -564,7 +564,7 @@ dependencies = [
[[package]]
name = "brk_query"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"bitcoin",
"brk_computer",
@@ -584,7 +584,7 @@ dependencies = [
[[package]]
name = "brk_reader"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"bitcoin",
"brk_error",
@@ -599,7 +599,7 @@ dependencies = [
[[package]]
name = "brk_rpc"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"bitcoin",
"bitcoincore-rpc",
@@ -612,7 +612,7 @@ dependencies = [
[[package]]
name = "brk_server"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"aide",
"axum",
@@ -644,7 +644,7 @@ dependencies = [
[[package]]
name = "brk_store"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_error",
"brk_types",
@@ -655,7 +655,7 @@ dependencies = [
[[package]]
name = "brk_traversable"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"brk_traversable_derive",
"brk_types",
@@ -668,7 +668,7 @@ dependencies = [
[[package]]
name = "brk_traversable_derive"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"proc-macro2",
"quote",
@@ -677,7 +677,7 @@ dependencies = [
[[package]]
name = "brk_types"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"bitcoin",
"brk_error",
@@ -686,7 +686,9 @@ dependencies = [
"indexmap",
"itoa",
"jiff",
"pco",
"rapidhash",
"rustc-hash",
"ryu",
"schemars",
"serde",
@@ -698,7 +700,7 @@ dependencies = [
[[package]]
name = "brk_website"
version = "0.1.3"
version = "0.1.7"
dependencies = [
"axum",
"brk_logger",
@@ -758,9 +760,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
[[package]]
name = "bytes"
version = "1.11.0"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
[[package]]
name = "byteview"
@@ -1241,9 +1243,9 @@ dependencies = [
[[package]]
name = "flate2"
version = "1.1.8"
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369"
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
dependencies = [
"crc32fast",
"miniz_oxide",
@@ -2434,9 +2436,9 @@ dependencies = [
[[package]]
name = "rawdb"
version = "0.6.5"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89f7fffcea393bd56abe3f7f691b88d5cb321e0b46b9caf1064bbcf2ec22180b"
checksum = "a66c17743b9a7e6a3bb8edb10fef25c62516e281b723ea38d7c1feea2035c75d"
dependencies = [
"libc",
"log",
@@ -2509,9 +2511,9 @@ dependencies = [
[[package]]
name = "regex"
version = "1.12.2"
version = "1.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
dependencies = [
"aho-corasick",
"memchr",
@@ -2521,9 +2523,9 @@ dependencies = [
[[package]]
name = "regex-automata"
version = "0.4.13"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
dependencies = [
"aho-corasick",
"memchr",
@@ -2532,9 +2534,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
version = "0.8.8"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c"
[[package]]
name = "ring"
@@ -3254,9 +3256,9 @@ checksum = "8f54a172d0620933a27a4360d3db3e2ae0dd6cceae9730751a036bbf182c4b23"
[[package]]
name = "vecdb"
version = "0.6.5"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92a5c013b67f59b479557f9ee47b365e3802b33348b5000c9f21381b5249669d"
checksum = "16459a73939ec1c7ddb5c2f4264916f7bb96c88287b15dcce29cd95c16d2f6c0"
dependencies = [
"ctrlc",
"log",
@@ -3275,9 +3277,9 @@ dependencies = [
[[package]]
name = "vecdb_derive"
version = "0.6.5"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d90acf14f49129f0f205bc45331e2608dcb09c55d218e7fdbfdbf4b7c31b9433"
checksum = "e1845265e89f36a22175ebef07dc1340050ef3ec54aa9f9c84859d4dda0a3a03"
dependencies = [
"quote",
"syn",
@@ -3696,18 +3698,18 @@ dependencies = [
[[package]]
name = "zerocopy"
version = "0.8.37"
version = "0.8.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7456cf00f0685ad319c5b1693f291a650eaf345e941d082fc4e03df8a03996ac"
checksum = "57cf3aa6855b23711ee9852dfc97dfaa51c45feaba5b645d0c777414d494a961"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.37"
version = "0.8.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1328722bbf2115db7e19d69ebcc15e795719e2d66b60827c6a69a117365e37a0"
checksum = "8a616990af1a287837c4fe6596ad77ef57948f787e46ce28e166facc0cc1cb75"
dependencies = [
"proc-macro2",
"quote",
+25 -24
View File
@@ -4,7 +4,7 @@ members = ["crates/*"]
package.description = "The Bitcoin Research Kit is a suite of tools designed to extract, compute and display data stored on a Bitcoin Core node"
package.license = "MIT"
package.edition = "2024"
package.version = "0.1.3"
package.version = "0.1.7"
package.homepage = "https://bitcoinresearchkit.org"
package.repository = "https://github.com/bitcoinresearchkit/brk"
package.readme = "README.md"
@@ -40,28 +40,28 @@ aide = { version = "0.16.0-alpha.2", features = ["axum-json", "axum-query"] }
axum = { version = "0.8.8", default-features = false, features = ["http1", "json", "query", "tokio", "tracing"] }
bitcoin = { version = "0.32.8", features = ["serde"] }
bitcoincore-rpc = "0.19.0"
brk_alloc = { version = "0.1.3", path = "crates/brk_alloc" }
brk_bencher = { version = "0.1.3", path = "crates/brk_bencher" }
brk_bindgen = { version = "0.1.3", path = "crates/brk_bindgen" }
brk_cli = { version = "0.1.3", path = "crates/brk_cli" }
brk_client = { version = "0.1.3", path = "crates/brk_client" }
brk_cohort = { version = "0.1.3", path = "crates/brk_cohort" }
brk_computer = { version = "0.1.3", path = "crates/brk_computer" }
brk_error = { version = "0.1.3", path = "crates/brk_error" }
brk_fetcher = { version = "0.1.3", path = "crates/brk_fetcher" }
brk_indexer = { version = "0.1.3", path = "crates/brk_indexer" }
brk_iterator = { version = "0.1.3", path = "crates/brk_iterator" }
brk_logger = { version = "0.1.3", path = "crates/brk_logger" }
brk_mempool = { version = "0.1.3", path = "crates/brk_mempool" }
brk_query = { version = "0.1.3", path = "crates/brk_query", features = ["tokio"] }
brk_reader = { version = "0.1.3", path = "crates/brk_reader" }
brk_rpc = { version = "0.1.3", path = "crates/brk_rpc" }
brk_server = { version = "0.1.3", path = "crates/brk_server" }
brk_store = { version = "0.1.3", path = "crates/brk_store" }
brk_traversable = { version = "0.1.3", path = "crates/brk_traversable", features = ["pco", "derive"] }
brk_traversable_derive = { version = "0.1.3", path = "crates/brk_traversable_derive" }
brk_types = { version = "0.1.3", path = "crates/brk_types" }
brk_website = { version = "0.1.3", path = "crates/brk_website" }
brk_alloc = { version = "0.1.7", path = "crates/brk_alloc" }
brk_bencher = { version = "0.1.7", path = "crates/brk_bencher" }
brk_bindgen = { version = "0.1.7", path = "crates/brk_bindgen" }
brk_cli = { version = "0.1.7", path = "crates/brk_cli" }
brk_client = { version = "0.1.7", path = "crates/brk_client" }
brk_cohort = { version = "0.1.7", path = "crates/brk_cohort" }
brk_computer = { version = "0.1.7", path = "crates/brk_computer" }
brk_error = { version = "0.1.7", path = "crates/brk_error" }
brk_fetcher = { version = "0.1.7", path = "crates/brk_fetcher" }
brk_indexer = { version = "0.1.7", path = "crates/brk_indexer" }
brk_iterator = { version = "0.1.7", path = "crates/brk_iterator" }
brk_logger = { version = "0.1.7", path = "crates/brk_logger" }
brk_mempool = { version = "0.1.7", path = "crates/brk_mempool" }
brk_query = { version = "0.1.7", path = "crates/brk_query", features = ["tokio"] }
brk_reader = { version = "0.1.7", path = "crates/brk_reader" }
brk_rpc = { version = "0.1.7", path = "crates/brk_rpc" }
brk_server = { version = "0.1.7", path = "crates/brk_server" }
brk_store = { version = "0.1.7", path = "crates/brk_store" }
brk_traversable = { version = "0.1.7", path = "crates/brk_traversable", features = ["pco", "derive"] }
brk_traversable_derive = { version = "0.1.7", path = "crates/brk_traversable_derive" }
brk_types = { version = "0.1.7", path = "crates/brk_types" }
brk_website = { version = "0.1.7", path = "crates/brk_website" }
byteview = "0.10.0"
color-eyre = "0.6.5"
derive_more = { version = "2.1.1", features = ["deref", "deref_mut"] }
@@ -71,6 +71,7 @@ jiff = { version = "0.2.18", features = ["perf-inline", "tz-system"], default-fe
minreq = { version = "2.14.1", features = ["https", "json-using-serde"] }
owo-colors = "4.2.3"
parking_lot = "0.12.5"
pco = "1.0.0"
rayon = "1.11.0"
rustc-hash = "2.1.1"
schemars = { version = "1.2.1", features = ["indexmap2"] }
@@ -83,7 +84,7 @@ tokio = { version = "1.49.0", features = ["rt-multi-thread"] }
tracing = { version = "0.1", default-features = false, features = ["std"] }
tower-http = { version = "0.6.8", features = ["catch-panic", "compression-br", "compression-gzip", "compression-zstd", "cors", "normalize-path", "timeout", "trace"] }
tower-layer = "0.3"
vecdb = { version = "0.6.5", features = ["derive", "serde_json", "pco", "schemars"] }
vecdb = { version = "0.6.8", features = ["derive", "serde_json", "pco", "schemars"] }
# vecdb = { path = "../anydb/crates/vecdb", features = ["derive", "serde_json", "pco", "schemars"] }
[workspace.metadata.release]
@@ -310,6 +310,9 @@ class BrkClientBase {{
this.timeout = isString ? 5000 : (options.timeout ?? 5000);
/** @type {{Promise<Cache | null>}} */
this._cachePromise = _openCache(isString ? undefined : options.cache);
/** @type {{Cache | null}} */
this._cache = null;
this._cachePromise.then(c => this._cache = c);
}}
/**
@@ -325,35 +328,57 @@ class BrkClientBase {{
}}
/**
* Make a GET request with stale-while-revalidate caching
* Make a GET request - races cache vs network, first to resolve calls onUpdate
* @template T
* @param {{string}} path
* @param {{(value: T) => void}} [onUpdate] - Called when data is available
* @param {{(value: T) => void}} [onUpdate] - Called when data is available (may be called twice: cache then network)
* @returns {{Promise<T>}}
*/
async getJson(path, onUpdate) {{
const base = this.baseUrl.endsWith('/') ? this.baseUrl.slice(0, -1) : this.baseUrl;
const url = `${{base}}${{path}}`;
const cache = await this._cachePromise;
const cachedRes = await cache?.match(url);
const cachedJson = cachedRes ? await cachedRes.json() : null;
const cache = this._cache ?? await this._cachePromise;
if (cachedJson) onUpdate?.(cachedJson);
if (globalThis.navigator?.onLine === false) {{
if (cachedJson) return cachedJson;
throw new BrkError('Offline and no cached data available');
}}
let resolved = false;
/** @type {{Response | null}} */
let cachedRes = null;
try {{
const res = await this.get(path);
if (cachedRes?.headers.get('ETag') === res.headers.get('ETag')) return cachedJson;
// Race cache vs network - first to resolve calls onUpdate
const cachePromise = cache?.match(url).then(async (res) => {{
cachedRes = res ?? null;
if (!res) return null;
const json = await res.json();
if (!resolved && onUpdate) {{
resolved = true;
onUpdate(json);
}}
return json;
}});
const networkPromise = this.get(path).then(async (res) => {{
const cloned = res.clone();
const json = await res.json();
onUpdate?.(json);
// Skip update if ETag matches and cache already delivered
if (cachedRes?.headers.get('ETag') === res.headers.get('ETag')) {{
if (!resolved && onUpdate) {{
resolved = true;
onUpdate(json);
}}
return json;
}}
resolved = true;
if (onUpdate) {{
onUpdate(json);
}}
if (cache) _runIdle(() => cache.put(url, cloned));
return json;
}});
try {{
return await networkPromise;
}} catch (e) {{
// Network failed - wait for cache
const cachedJson = await cachePromise?.catch(() => null);
if (cachedJson) return cachedJson;
throw e;
}}
@@ -10,7 +10,7 @@ pub fn js_type_to_rust(js_type: &str) -> String {
"integer" => "i64".to_string(),
"number" => "f64".to_string(),
"boolean" => "bool".to_string(),
"*" => "serde_json::Value".to_string(),
"*" | "Object" => "serde_json::Value".to_string(),
other => other.to_string(),
}
}
+196 -91
View File
@@ -858,7 +858,7 @@ impl<T: DeserializeOwned> MetricPattern<T> for MetricPattern32<T> { fn get(&self
// Reusable pattern structs
/// Pattern struct for repeated tree structure.
pub struct AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern {
pub struct AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern {
pub adjusted_sopr: MetricPattern6<StoredF64>,
pub adjusted_sopr_30d_ema: MetricPattern6<StoredF64>,
pub adjusted_sopr_7d_ema: MetricPattern6<StoredF64>,
@@ -872,6 +872,7 @@ pub struct AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSe
pub investor_price_extra: RatioPattern,
pub loss_value_created: MetricPattern1<Dollars>,
pub loss_value_destroyed: MetricPattern1<Dollars>,
pub lower_price_band: DollarsSatsPattern,
pub mvrv: MetricPattern4<StoredF32>,
pub neg_realized_loss: CumulativeSumPattern2<Dollars>,
pub net_realized_pnl: CumulativeSumPattern<Dollars>,
@@ -910,11 +911,12 @@ pub struct AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSe
pub sopr_30d_ema: MetricPattern6<StoredF64>,
pub sopr_7d_ema: MetricPattern6<StoredF64>,
pub total_realized_pnl: MetricPattern1<Dollars>,
pub upper_price_band: DollarsSatsPattern,
pub value_created: MetricPattern1<Dollars>,
pub value_destroyed: MetricPattern1<Dollars>,
}
impl AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern {
impl AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
@@ -931,6 +933,7 @@ impl AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSopr
investor_price_extra: RatioPattern::new(client.clone(), _m(&acc, "investor_price_ratio")),
loss_value_created: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_created")),
loss_value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_destroyed")),
lower_price_band: DollarsSatsPattern::new(client.clone(), _m(&acc, "lower_price_band")),
mvrv: MetricPattern4::new(client.clone(), _m(&acc, "mvrv")),
neg_realized_loss: CumulativeSumPattern2::new(client.clone(), _m(&acc, "neg_realized_loss")),
net_realized_pnl: CumulativeSumPattern::new(client.clone(), _m(&acc, "net_realized_pnl")),
@@ -969,6 +972,7 @@ impl AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSopr
sopr_30d_ema: MetricPattern6::new(client.clone(), _m(&acc, "sopr_30d_ema")),
sopr_7d_ema: MetricPattern6::new(client.clone(), _m(&acc, "sopr_7d_ema")),
total_realized_pnl: MetricPattern1::new(client.clone(), _m(&acc, "total_realized_pnl")),
upper_price_band: DollarsSatsPattern::new(client.clone(), _m(&acc, "upper_price_band")),
value_created: MetricPattern1::new(client.clone(), _m(&acc, "value_created")),
value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "value_destroyed")),
}
@@ -976,7 +980,7 @@ impl AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSopr
}
/// Pattern struct for repeated tree structure.
pub struct AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2 {
pub struct AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2 {
pub adjusted_sopr: MetricPattern6<StoredF64>,
pub adjusted_sopr_30d_ema: MetricPattern6<StoredF64>,
pub adjusted_sopr_7d_ema: MetricPattern6<StoredF64>,
@@ -990,6 +994,7 @@ pub struct AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSe
pub investor_price_extra: RatioPattern2,
pub loss_value_created: MetricPattern1<Dollars>,
pub loss_value_destroyed: MetricPattern1<Dollars>,
pub lower_price_band: DollarsSatsPattern,
pub mvrv: MetricPattern4<StoredF32>,
pub neg_realized_loss: CumulativeSumPattern2<Dollars>,
pub net_realized_pnl: CumulativeSumPattern<Dollars>,
@@ -1026,11 +1031,12 @@ pub struct AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSe
pub sopr_30d_ema: MetricPattern6<StoredF64>,
pub sopr_7d_ema: MetricPattern6<StoredF64>,
pub total_realized_pnl: MetricPattern1<Dollars>,
pub upper_price_band: DollarsSatsPattern,
pub value_created: MetricPattern1<Dollars>,
pub value_destroyed: MetricPattern1<Dollars>,
}
impl AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2 {
impl AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2 {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
@@ -1047,6 +1053,7 @@ impl AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSopr
investor_price_extra: RatioPattern2::new(client.clone(), _m(&acc, "investor_price_ratio")),
loss_value_created: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_created")),
loss_value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_destroyed")),
lower_price_band: DollarsSatsPattern::new(client.clone(), _m(&acc, "lower_price_band")),
mvrv: MetricPattern4::new(client.clone(), _m(&acc, "mvrv")),
neg_realized_loss: CumulativeSumPattern2::new(client.clone(), _m(&acc, "neg_realized_loss")),
net_realized_pnl: CumulativeSumPattern::new(client.clone(), _m(&acc, "net_realized_pnl")),
@@ -1083,6 +1090,7 @@ impl AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSopr
sopr_30d_ema: MetricPattern6::new(client.clone(), _m(&acc, "sopr_30d_ema")),
sopr_7d_ema: MetricPattern6::new(client.clone(), _m(&acc, "sopr_7d_ema")),
total_realized_pnl: MetricPattern1::new(client.clone(), _m(&acc, "total_realized_pnl")),
upper_price_band: DollarsSatsPattern::new(client.clone(), _m(&acc, "upper_price_band")),
value_created: MetricPattern1::new(client.clone(), _m(&acc, "value_created")),
value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "value_destroyed")),
}
@@ -1090,7 +1098,7 @@ impl AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSopr
}
/// Pattern struct for repeated tree structure.
pub struct CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2 {
pub struct CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2 {
pub cap_raw: MetricPattern11<CentsSats>,
pub capitulation_flow: MetricPattern1<Dollars>,
pub investor_cap_raw: MetricPattern11<CentsSquaredSats>,
@@ -1099,6 +1107,7 @@ pub struct CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTo
pub investor_price_extra: RatioPattern,
pub loss_value_created: MetricPattern1<Dollars>,
pub loss_value_destroyed: MetricPattern1<Dollars>,
pub lower_price_band: DollarsSatsPattern,
pub mvrv: MetricPattern4<StoredF32>,
pub neg_realized_loss: CumulativeSumPattern2<Dollars>,
pub net_realized_pnl: CumulativeSumPattern<Dollars>,
@@ -1137,11 +1146,12 @@ pub struct CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTo
pub sopr_30d_ema: MetricPattern6<StoredF64>,
pub sopr_7d_ema: MetricPattern6<StoredF64>,
pub total_realized_pnl: MetricPattern1<Dollars>,
pub upper_price_band: DollarsSatsPattern,
pub value_created: MetricPattern1<Dollars>,
pub value_destroyed: MetricPattern1<Dollars>,
}
impl CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2 {
impl CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2 {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
@@ -1153,6 +1163,7 @@ impl CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalVal
investor_price_extra: RatioPattern::new(client.clone(), _m(&acc, "investor_price_ratio")),
loss_value_created: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_created")),
loss_value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_destroyed")),
lower_price_band: DollarsSatsPattern::new(client.clone(), _m(&acc, "lower_price_band")),
mvrv: MetricPattern4::new(client.clone(), _m(&acc, "mvrv")),
neg_realized_loss: CumulativeSumPattern2::new(client.clone(), _m(&acc, "neg_realized_loss")),
net_realized_pnl: CumulativeSumPattern::new(client.clone(), _m(&acc, "net_realized_pnl")),
@@ -1191,6 +1202,7 @@ impl CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalVal
sopr_30d_ema: MetricPattern6::new(client.clone(), _m(&acc, "sopr_30d_ema")),
sopr_7d_ema: MetricPattern6::new(client.clone(), _m(&acc, "sopr_7d_ema")),
total_realized_pnl: MetricPattern1::new(client.clone(), _m(&acc, "total_realized_pnl")),
upper_price_band: DollarsSatsPattern::new(client.clone(), _m(&acc, "upper_price_band")),
value_created: MetricPattern1::new(client.clone(), _m(&acc, "value_created")),
value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "value_destroyed")),
}
@@ -1198,7 +1210,7 @@ impl CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalVal
}
/// Pattern struct for repeated tree structure.
pub struct CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern {
pub struct CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern {
pub cap_raw: MetricPattern11<CentsSats>,
pub capitulation_flow: MetricPattern1<Dollars>,
pub investor_cap_raw: MetricPattern11<CentsSquaredSats>,
@@ -1207,6 +1219,7 @@ pub struct CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTo
pub investor_price_extra: RatioPattern2,
pub loss_value_created: MetricPattern1<Dollars>,
pub loss_value_destroyed: MetricPattern1<Dollars>,
pub lower_price_band: DollarsSatsPattern,
pub mvrv: MetricPattern4<StoredF32>,
pub neg_realized_loss: CumulativeSumPattern2<Dollars>,
pub net_realized_pnl: CumulativeSumPattern<Dollars>,
@@ -1243,11 +1256,12 @@ pub struct CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTo
pub sopr_30d_ema: MetricPattern6<StoredF64>,
pub sopr_7d_ema: MetricPattern6<StoredF64>,
pub total_realized_pnl: MetricPattern1<Dollars>,
pub upper_price_band: DollarsSatsPattern,
pub value_created: MetricPattern1<Dollars>,
pub value_destroyed: MetricPattern1<Dollars>,
}
impl CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern {
impl CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
@@ -1259,6 +1273,7 @@ impl CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalVal
investor_price_extra: RatioPattern2::new(client.clone(), _m(&acc, "investor_price_ratio")),
loss_value_created: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_created")),
loss_value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "loss_value_destroyed")),
lower_price_band: DollarsSatsPattern::new(client.clone(), _m(&acc, "lower_price_band")),
mvrv: MetricPattern4::new(client.clone(), _m(&acc, "mvrv")),
neg_realized_loss: CumulativeSumPattern2::new(client.clone(), _m(&acc, "neg_realized_loss")),
net_realized_pnl: CumulativeSumPattern::new(client.clone(), _m(&acc, "net_realized_pnl")),
@@ -1295,6 +1310,7 @@ impl CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalVal
sopr_30d_ema: MetricPattern6::new(client.clone(), _m(&acc, "sopr_30d_ema")),
sopr_7d_ema: MetricPattern6::new(client.clone(), _m(&acc, "sopr_7d_ema")),
total_realized_pnl: MetricPattern1::new(client.clone(), _m(&acc, "total_realized_pnl")),
upper_price_band: DollarsSatsPattern::new(client.clone(), _m(&acc, "upper_price_band")),
value_created: MetricPattern1::new(client.clone(), _m(&acc, "value_created")),
value_destroyed: MetricPattern1::new(client.clone(), _m(&acc, "value_destroyed")),
}
@@ -2025,32 +2041,62 @@ impl<T: DeserializeOwned> AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPa
}
}
/// Pattern struct for repeated tree structure.
pub struct ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern {
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub addr_count: MetricPattern1<StoredU64>,
pub addr_count_30d_change: MetricPattern4<StoredF64>,
pub cost_basis: MaxMinPattern,
pub outputs: UtxoPattern,
pub realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern,
pub relative: InvestedNegNetNuplSupplyUnrealizedPattern,
pub supply: _30dHalvedTotalPattern,
pub unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern,
}
impl ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), acc.clone()),
addr_count: MetricPattern1::new(client.clone(), _m(&acc, "addr_count")),
addr_count_30d_change: MetricPattern4::new(client.clone(), _m(&acc, "addr_count_30d_change")),
cost_basis: MaxMinPattern::new(client.clone(), acc.clone()),
outputs: UtxoPattern::new(client.clone(), _m(&acc, "utxo_count")),
realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern::new(client.clone(), acc.clone()),
relative: InvestedNegNetNuplSupplyUnrealizedPattern::new(client.clone(), acc.clone()),
supply: _30dHalvedTotalPattern::new(client.clone(), acc.clone()),
unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern::new(client.clone(), acc.clone()),
}
}
}
/// Pattern struct for repeated tree structure.
pub struct AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern {
pub all: MetricPattern1<StoredU64>,
pub p2a: MetricPattern1<StoredU64>,
pub p2pk33: MetricPattern1<StoredU64>,
pub p2pk65: MetricPattern1<StoredU64>,
pub p2pkh: MetricPattern1<StoredU64>,
pub p2sh: MetricPattern1<StoredU64>,
pub p2tr: MetricPattern1<StoredU64>,
pub p2wpkh: MetricPattern1<StoredU64>,
pub p2wsh: MetricPattern1<StoredU64>,
pub all: _30dCountPattern,
pub p2a: _30dCountPattern,
pub p2pk33: _30dCountPattern,
pub p2pk65: _30dCountPattern,
pub p2pkh: _30dCountPattern,
pub p2sh: _30dCountPattern,
pub p2tr: _30dCountPattern,
pub p2wpkh: _30dCountPattern,
pub p2wsh: _30dCountPattern,
}
impl AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
all: MetricPattern1::new(client.clone(), acc.clone()),
p2a: MetricPattern1::new(client.clone(), _p("p2a", &acc)),
p2pk33: MetricPattern1::new(client.clone(), _p("p2pk33", &acc)),
p2pk65: MetricPattern1::new(client.clone(), _p("p2pk65", &acc)),
p2pkh: MetricPattern1::new(client.clone(), _p("p2pkh", &acc)),
p2sh: MetricPattern1::new(client.clone(), _p("p2sh", &acc)),
p2tr: MetricPattern1::new(client.clone(), _p("p2tr", &acc)),
p2wpkh: MetricPattern1::new(client.clone(), _p("p2wpkh", &acc)),
p2wsh: MetricPattern1::new(client.clone(), _p("p2wsh", &acc)),
all: _30dCountPattern::new(client.clone(), acc.clone()),
p2a: _30dCountPattern::new(client.clone(), _p("p2a", &acc)),
p2pk33: _30dCountPattern::new(client.clone(), _p("p2pk33", &acc)),
p2pk65: _30dCountPattern::new(client.clone(), _p("p2pk65", &acc)),
p2pkh: _30dCountPattern::new(client.clone(), _p("p2pkh", &acc)),
p2sh: _30dCountPattern::new(client.clone(), _p("p2sh", &acc)),
p2tr: _30dCountPattern::new(client.clone(), _p("p2tr", &acc)),
p2wpkh: _30dCountPattern::new(client.clone(), _p("p2wpkh", &acc)),
p2wsh: _30dCountPattern::new(client.clone(), _p("p2wsh", &acc)),
}
}
}
@@ -2115,34 +2161,6 @@ impl<T: DeserializeOwned> AverageBaseMaxMedianMinPct10Pct25Pct75Pct90Pattern<T>
}
}
/// Pattern struct for repeated tree structure.
pub struct ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern {
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub addr_count: MetricPattern1<StoredU64>,
pub cost_basis: MaxMinPattern,
pub outputs: UtxoPattern,
pub realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern,
pub relative: InvestedNegNetNuplSupplyUnrealizedPattern,
pub supply: _30dHalvedTotalPattern,
pub unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern,
}
impl ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), acc.clone()),
addr_count: MetricPattern1::new(client.clone(), _m(&acc, "addr_count")),
cost_basis: MaxMinPattern::new(client.clone(), acc.clone()),
outputs: UtxoPattern::new(client.clone(), _m(&acc, "utxo_count")),
realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern::new(client.clone(), acc.clone()),
relative: InvestedNegNetNuplSupplyUnrealizedPattern::new(client.clone(), acc.clone()),
supply: _30dHalvedTotalPattern::new(client.clone(), acc.clone()),
unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern::new(client.clone(), acc.clone()),
}
}
}
/// Pattern struct for repeated tree structure.
pub struct _10y2y3y4y5y6y8yPattern {
pub _10y: MetricPattern4<StoredF32>,
@@ -2174,7 +2192,7 @@ pub struct ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern {
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub cost_basis: InvestedMaxMinPercentilesSpotPattern,
pub outputs: UtxoPattern,
pub realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2,
pub realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2,
pub relative: InvestedNegNetSupplyUnrealizedPattern,
pub supply: _30dHalvedTotalPattern,
pub unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern,
@@ -2187,7 +2205,7 @@ impl ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern {
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), acc.clone()),
cost_basis: InvestedMaxMinPercentilesSpotPattern::new(client.clone(), acc.clone()),
outputs: UtxoPattern::new(client.clone(), _m(&acc, "utxo_count")),
realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2::new(client.clone(), acc.clone()),
realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2::new(client.clone(), acc.clone()),
relative: InvestedNegNetSupplyUnrealizedPattern::new(client.clone(), acc.clone()),
supply: _30dHalvedTotalPattern::new(client.clone(), acc.clone()),
unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern::new(client.clone(), acc.clone()),
@@ -2200,7 +2218,7 @@ pub struct ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern5 {
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub cost_basis: MaxMinPattern,
pub outputs: UtxoPattern,
pub realized: AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2,
pub realized: AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2,
pub relative: InvestedNegNetNuplSupplyUnrealizedPattern3,
pub supply: _30dHalvedTotalPattern,
pub unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern,
@@ -2213,7 +2231,7 @@ impl ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern5 {
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), acc.clone()),
cost_basis: MaxMinPattern::new(client.clone(), acc.clone()),
outputs: UtxoPattern::new(client.clone(), _m(&acc, "utxo_count")),
realized: AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2::new(client.clone(), acc.clone()),
realized: AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2::new(client.clone(), acc.clone()),
relative: InvestedNegNetNuplSupplyUnrealizedPattern3::new(client.clone(), acc.clone()),
supply: _30dHalvedTotalPattern::new(client.clone(), acc.clone()),
unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern::new(client.clone(), acc.clone()),
@@ -2226,7 +2244,7 @@ pub struct ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern4 {
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub cost_basis: MaxMinPattern,
pub outputs: UtxoPattern,
pub realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern,
pub realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern,
pub relative: InvestedNegNetNuplSupplyUnrealizedPattern,
pub supply: _30dHalvedTotalPattern,
pub unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern,
@@ -2239,7 +2257,7 @@ impl ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern4 {
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), acc.clone()),
cost_basis: MaxMinPattern::new(client.clone(), acc.clone()),
outputs: UtxoPattern::new(client.clone(), _m(&acc, "utxo_count")),
realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern::new(client.clone(), acc.clone()),
realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern::new(client.clone(), acc.clone()),
relative: InvestedNegNetNuplSupplyUnrealizedPattern::new(client.clone(), acc.clone()),
supply: _30dHalvedTotalPattern::new(client.clone(), acc.clone()),
unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern::new(client.clone(), acc.clone()),
@@ -2252,7 +2270,7 @@ pub struct ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern6 {
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub cost_basis: MaxMinPattern,
pub outputs: UtxoPattern,
pub realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern,
pub realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern,
pub relative: InvestedNegNetNuplSupplyUnrealizedPattern3,
pub supply: _30dHalvedTotalPattern,
pub unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern,
@@ -2265,7 +2283,7 @@ impl ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern6 {
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), acc.clone()),
cost_basis: MaxMinPattern::new(client.clone(), acc.clone()),
outputs: UtxoPattern::new(client.clone(), _m(&acc, "utxo_count")),
realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern::new(client.clone(), acc.clone()),
realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern::new(client.clone(), acc.clone()),
relative: InvestedNegNetNuplSupplyUnrealizedPattern3::new(client.clone(), acc.clone()),
supply: _30dHalvedTotalPattern::new(client.clone(), acc.clone()),
unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern::new(client.clone(), acc.clone()),
@@ -2278,7 +2296,7 @@ pub struct ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern3 {
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub cost_basis: MaxMinPattern,
pub outputs: UtxoPattern,
pub realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern,
pub realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern,
pub relative: InvestedSupplyPattern,
pub supply: _30dHalvedTotalPattern,
pub unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern,
@@ -2291,7 +2309,7 @@ impl ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern3 {
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), acc.clone()),
cost_basis: MaxMinPattern::new(client.clone(), acc.clone()),
outputs: UtxoPattern::new(client.clone(), _m(&acc, "utxo_count")),
realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern::new(client.clone(), acc.clone()),
realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern::new(client.clone(), acc.clone()),
relative: InvestedSupplyPattern::new(client.clone(), acc.clone()),
supply: _30dHalvedTotalPattern::new(client.clone(), acc.clone()),
unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern::new(client.clone(), acc.clone()),
@@ -2304,7 +2322,7 @@ pub struct ActivityCostOutputsRealizedSupplyUnrealizedPattern {
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub cost_basis: MaxMinPattern,
pub outputs: UtxoPattern,
pub realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern,
pub realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern,
pub supply: _30dHalvedTotalPattern,
pub unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern,
}
@@ -2316,7 +2334,7 @@ impl ActivityCostOutputsRealizedSupplyUnrealizedPattern {
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), acc.clone()),
cost_basis: MaxMinPattern::new(client.clone(), acc.clone()),
outputs: UtxoPattern::new(client.clone(), _m(&acc, "utxo_count")),
realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern::new(client.clone(), acc.clone()),
realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern::new(client.clone(), acc.clone()),
supply: _30dHalvedTotalPattern::new(client.clone(), acc.clone()),
unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern::new(client.clone(), acc.clone()),
}
@@ -2561,6 +2579,22 @@ impl BitcoinDollarsSatsPattern3 {
}
}
/// Pattern struct for repeated tree structure.
pub struct _30dCountPattern {
pub _30d_change: MetricPattern4<StoredF64>,
pub count: MetricPattern1<StoredU64>,
}
impl _30dCountPattern {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
_30d_change: MetricPattern4::new(client.clone(), _m(&acc, "30d_change")),
count: MetricPattern1::new(client.clone(), acc.clone()),
}
}
}
/// Pattern struct for repeated tree structure.
pub struct DollarsSatsPattern {
pub dollars: MetricPattern1<Dollars>,
@@ -2625,6 +2659,22 @@ impl SdSmaPattern {
}
}
/// Pattern struct for repeated tree structure.
pub struct UtxoPattern {
pub utxo_count: MetricPattern1<StoredU64>,
pub utxo_count_30d_change: MetricPattern4<StoredF64>,
}
impl UtxoPattern {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
utxo_count: MetricPattern1::new(client.clone(), acc.clone()),
utxo_count_30d_change: MetricPattern4::new(client.clone(), _m(&acc, "30d_change")),
}
}
}
/// Pattern struct for repeated tree structure.
pub struct CumulativeSumPattern<T> {
pub cumulative: MetricPattern1<T>,
@@ -2687,20 +2737,6 @@ impl RatioPattern2 {
}
}
/// Pattern struct for repeated tree structure.
pub struct UtxoPattern {
pub utxo_count: MetricPattern1<StoredU64>,
}
impl UtxoPattern {
/// Create a new pattern node with accumulated metric name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
utxo_count: MetricPattern1::new(client.clone(), acc.clone()),
}
}
}
// Metrics tree
/// Metrics tree node.
@@ -2859,6 +2895,8 @@ pub struct MetricsTree_Blocks_Mining {
pub hash_rate_1m_sma: MetricPattern4<StoredF32>,
pub hash_rate_2m_sma: MetricPattern4<StoredF32>,
pub hash_rate_1y_sma: MetricPattern4<StoredF32>,
pub hash_rate_ath: MetricPattern1<StoredF64>,
pub hash_rate_drawdown: MetricPattern1<StoredF32>,
pub hash_price_ths: MetricPattern1<StoredF32>,
pub hash_price_ths_min: MetricPattern1<StoredF32>,
pub hash_price_phs: MetricPattern1<StoredF32>,
@@ -2879,6 +2917,8 @@ impl MetricsTree_Blocks_Mining {
hash_rate_1m_sma: MetricPattern4::new(client.clone(), "hash_rate_1m_sma".to_string()),
hash_rate_2m_sma: MetricPattern4::new(client.clone(), "hash_rate_2m_sma".to_string()),
hash_rate_1y_sma: MetricPattern4::new(client.clone(), "hash_rate_1y_sma".to_string()),
hash_rate_ath: MetricPattern1::new(client.clone(), "hash_rate_ath".to_string()),
hash_rate_drawdown: MetricPattern1::new(client.clone(), "hash_rate_drawdown".to_string()),
hash_price_ths: MetricPattern1::new(client.clone(), "hash_price_ths".to_string()),
hash_price_ths_min: MetricPattern1::new(client.clone(), "hash_price_ths_min".to_string()),
hash_price_phs: MetricPattern1::new(client.clone(), "hash_price_phs".to_string()),
@@ -3515,7 +3555,7 @@ impl MetricsTree_Cointime_Adjusted {
/// Metrics tree node.
pub struct MetricsTree_Cointime_ReserveRisk {
pub vocdd_365d_sma: MetricPattern6<StoredF64>,
pub vocdd_365d_median: MetricPattern6<StoredF64>,
pub hodl_bank: MetricPattern6<StoredF64>,
pub reserve_risk: MetricPattern4<StoredF64>,
}
@@ -3523,7 +3563,7 @@ pub struct MetricsTree_Cointime_ReserveRisk {
impl MetricsTree_Cointime_ReserveRisk {
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
Self {
vocdd_365d_sma: MetricPattern6::new(client.clone(), "vocdd_365d_sma".to_string()),
vocdd_365d_median: MetricPattern6::new(client.clone(), "vocdd_365d_median".to_string()),
hodl_bank: MetricPattern6::new(client.clone(), "hodl_bank".to_string()),
reserve_risk: MetricPattern4::new(client.clone(), "reserve_risk".to_string()),
}
@@ -5109,7 +5149,7 @@ pub struct MetricsTree_Distribution {
pub addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern,
pub empty_addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern,
pub address_activity: MetricsTree_Distribution_AddressActivity,
pub total_addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern,
pub total_addr_count: MetricsTree_Distribution_TotalAddrCount,
pub new_addr_count: MetricsTree_Distribution_NewAddrCount,
pub growth_rate: MetricsTree_Distribution_GrowthRate,
pub fundedaddressindex: MetricPattern31<FundedAddressIndex>,
@@ -5127,7 +5167,7 @@ impl MetricsTree_Distribution {
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")),
total_addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new(client.clone(), "total_addr_count".to_string()),
total_addr_count: MetricsTree_Distribution_TotalAddrCount::new(client.clone(), format!("{base_path}_total_addr_count")),
new_addr_count: MetricsTree_Distribution_NewAddrCount::new(client.clone(), format!("{base_path}_new_addr_count")),
growth_rate: MetricsTree_Distribution_GrowthRate::new(client.clone(), format!("{base_path}_growth_rate")),
fundedaddressindex: MetricPattern31::new(client.clone(), "fundedaddressindex".to_string()),
@@ -5216,7 +5256,7 @@ pub struct MetricsTree_Distribution_UtxoCohorts_All {
pub supply: _30dHalvedTotalPattern,
pub outputs: UtxoPattern,
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub realized: AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern,
pub realized: AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern,
pub unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern,
pub cost_basis: InvestedMaxMinPercentilesSpotPattern,
pub relative: MetricsTree_Distribution_UtxoCohorts_All_Relative,
@@ -5228,7 +5268,7 @@ impl MetricsTree_Distribution_UtxoCohorts_All {
supply: _30dHalvedTotalPattern::new(client.clone(), "".to_string()),
outputs: UtxoPattern::new(client.clone(), "utxo_count".to_string()),
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), "".to_string()),
realized: AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern::new(client.clone(), "".to_string()),
realized: AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern::new(client.clone(), "".to_string()),
unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern::new(client.clone(), "".to_string()),
cost_basis: InvestedMaxMinPercentilesSpotPattern::new(client.clone(), "".to_string()),
relative: MetricsTree_Distribution_UtxoCohorts_All_Relative::new(client.clone(), format!("{base_path}_relative")),
@@ -5541,7 +5581,7 @@ pub struct MetricsTree_Distribution_UtxoCohorts_Term_Short {
pub supply: _30dHalvedTotalPattern,
pub outputs: UtxoPattern,
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub realized: AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern,
pub realized: AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern,
pub unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern,
pub cost_basis: InvestedMaxMinPercentilesSpotPattern,
pub relative: InvestedNegNetNuplSupplyUnrealizedPattern4,
@@ -5553,7 +5593,7 @@ impl MetricsTree_Distribution_UtxoCohorts_Term_Short {
supply: _30dHalvedTotalPattern::new(client.clone(), "sth".to_string()),
outputs: UtxoPattern::new(client.clone(), "sth_utxo_count".to_string()),
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), "sth".to_string()),
realized: AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern::new(client.clone(), "sth".to_string()),
realized: AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern::new(client.clone(), "sth".to_string()),
unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern::new(client.clone(), "sth".to_string()),
cost_basis: InvestedMaxMinPercentilesSpotPattern::new(client.clone(), "sth".to_string()),
relative: InvestedNegNetNuplSupplyUnrealizedPattern4::new(client.clone(), "sth".to_string()),
@@ -5566,7 +5606,7 @@ pub struct MetricsTree_Distribution_UtxoCohorts_Term_Long {
pub supply: _30dHalvedTotalPattern,
pub outputs: UtxoPattern,
pub activity: CoinblocksCoindaysSatblocksSatdaysSentPattern,
pub realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2,
pub realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2,
pub unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern,
pub cost_basis: InvestedMaxMinPercentilesSpotPattern,
pub relative: InvestedNegNetNuplSupplyUnrealizedPattern4,
@@ -5578,7 +5618,7 @@ impl MetricsTree_Distribution_UtxoCohorts_Term_Long {
supply: _30dHalvedTotalPattern::new(client.clone(), "lth".to_string()),
outputs: UtxoPattern::new(client.clone(), "lth_utxo_count".to_string()),
activity: CoinblocksCoindaysSatblocksSatdaysSentPattern::new(client.clone(), "lth".to_string()),
realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2::new(client.clone(), "lth".to_string()),
realized: CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2::new(client.clone(), "lth".to_string()),
unrealized: GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern::new(client.clone(), "lth".to_string()),
cost_basis: InvestedMaxMinPercentilesSpotPattern::new(client.clone(), "lth".to_string()),
relative: InvestedNegNetNuplSupplyUnrealizedPattern4::new(client.clone(), "lth".to_string()),
@@ -5864,6 +5904,35 @@ impl MetricsTree_Distribution_AddressActivity {
}
}
/// Metrics tree node.
pub struct MetricsTree_Distribution_TotalAddrCount {
pub all: MetricPattern1<StoredU64>,
pub p2pk65: MetricPattern1<StoredU64>,
pub p2pk33: MetricPattern1<StoredU64>,
pub p2pkh: MetricPattern1<StoredU64>,
pub p2sh: MetricPattern1<StoredU64>,
pub p2wpkh: MetricPattern1<StoredU64>,
pub p2wsh: MetricPattern1<StoredU64>,
pub p2tr: MetricPattern1<StoredU64>,
pub p2a: MetricPattern1<StoredU64>,
}
impl MetricsTree_Distribution_TotalAddrCount {
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
Self {
all: MetricPattern1::new(client.clone(), "total_addr_count".to_string()),
p2pk65: MetricPattern1::new(client.clone(), "p2pk65_total_addr_count".to_string()),
p2pk33: MetricPattern1::new(client.clone(), "p2pk33_total_addr_count".to_string()),
p2pkh: MetricPattern1::new(client.clone(), "p2pkh_total_addr_count".to_string()),
p2sh: MetricPattern1::new(client.clone(), "p2sh_total_addr_count".to_string()),
p2wpkh: MetricPattern1::new(client.clone(), "p2wpkh_total_addr_count".to_string()),
p2wsh: MetricPattern1::new(client.clone(), "p2wsh_total_addr_count".to_string()),
p2tr: MetricPattern1::new(client.clone(), "p2tr_total_addr_count".to_string()),
p2a: MetricPattern1::new(client.clone(), "p2a_total_addr_count".to_string()),
}
}
}
/// Metrics tree node.
pub struct MetricsTree_Distribution_NewAddrCount {
pub all: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2<StoredU64>,
@@ -5998,7 +6067,7 @@ pub struct BrkClient {
impl BrkClient {
/// Client version.
pub const VERSION: &'static str = "v0.1.2";
pub const VERSION: &'static str = "v0.1.6";
/// Create a new client with the given base URL.
pub fn new(base_url: impl Into<String>) -> Self {
@@ -6293,6 +6362,42 @@ impl BrkClient {
}
}
/// Available cost basis cohorts
///
/// List available cohorts for cost basis distribution.
///
/// Endpoint: `GET /api/metrics/cost-basis`
pub fn get_cost_basis_cohorts(&self) -> Result<Vec<String>> {
self.base.get_json(&format!("/api/metrics/cost-basis"))
}
/// Available cost basis dates
///
/// List available dates for a cohort's cost basis distribution.
///
/// Endpoint: `GET /api/metrics/cost-basis/{cohort}/dates`
pub fn get_cost_basis_dates(&self, cohort: Cohort) -> Result<Vec<Date>> {
self.base.get_json(&format!("/api/metrics/cost-basis/{cohort}/dates"))
}
/// Cost basis distribution
///
/// Get the cost basis distribution for a cohort on a specific date.
///
/// Query params:
/// - `bucket`: raw (default), lin200, lin500, lin1000, log10, log50, log100
/// - `value`: supply (default, in BTC), realized (USD), unrealized (USD)
///
/// Endpoint: `GET /api/metrics/cost-basis/{cohort}/{date}`
pub fn get_cost_basis(&self, cohort: Cohort, date: &str, bucket: Option<CostBasisBucket>, value: Option<CostBasisValue>) -> Result<serde_json::Value> {
let mut query = Vec::new();
if let Some(v) = bucket { query.push(format!("bucket={}", v)); }
if let Some(v) = value { query.push(format!("value={}", v)); }
let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) };
let path = format!("/api/metrics/cost-basis/{cohort}/{date}{}", query_str);
self.base.get_json(&path)
}
/// Metric count
///
/// Returns the number of metrics available per index type.
-1
View File
@@ -22,7 +22,6 @@ brk_traversable = { workspace = true }
brk_types = { workspace = true }
derive_more = { workspace = true }
tracing = { workspace = true }
pco = "1.0.0"
rayon = { workspace = true }
rustc-hash = { workspace = true }
schemars = { workspace = true }
@@ -4,7 +4,7 @@ use vecdb::Exit;
use super::super::{ONE_TERA_HASH, TARGET_BLOCKS_PER_DAY_F64, count, difficulty, rewards};
use super::Vecs;
use crate::{ComputeIndexes, indexes};
use crate::{ComputeIndexes, indexes, traits::ComputeDrawdown};
impl Vecs {
pub fn compute(
@@ -80,6 +80,27 @@ impl Vecs {
Ok(())
})?;
self.hash_rate_ath
.compute_all(indexes, starting_indexes, exit, |v| {
v.compute_all_time_high(
starting_indexes.height,
&self.hash_rate.height,
exit,
)?;
Ok(())
})?;
self.hash_rate_drawdown
.compute_all(indexes, starting_indexes, exit, |v| {
v.compute_drawdown(
starting_indexes.height,
&self.hash_rate.height,
&self.hash_rate_ath.height,
exit,
)?;
Ok(())
})?;
self.hash_price_ths
.compute_all(indexes, starting_indexes, exit, |v| {
v.compute_transform2(
@@ -43,6 +43,18 @@ impl Vecs {
version,
indexes,
)?,
hash_rate_ath: ComputedFromHeightLast::forced_import(
db,
"hash_rate_ath",
version,
indexes,
)?,
hash_rate_drawdown: ComputedFromHeightLast::forced_import(
db,
"hash_rate_drawdown",
version,
indexes,
)?,
hash_price_ths: ComputedFromHeightLast::forced_import(
db,
"hash_price_ths",
@@ -11,6 +11,8 @@ pub struct Vecs {
pub hash_rate_1m_sma: ComputedFromDateLast<StoredF32>,
pub hash_rate_2m_sma: ComputedFromDateLast<StoredF32>,
pub hash_rate_1y_sma: ComputedFromDateLast<StoredF32>,
pub hash_rate_ath: ComputedFromHeightLast<StoredF64>,
pub hash_rate_drawdown: ComputedFromHeightLast<StoredF32>,
pub hash_price_ths: ComputedFromHeightLast<StoredF32>,
pub hash_price_ths_min: ComputedFromHeightLast<StoredF32>,
pub hash_price_phs: ComputedFromHeightLast<StoredF32>,
@@ -15,7 +15,7 @@ impl Vecs {
) -> Result<()> {
let vocdd_dateindex_sum = &value.vocdd.dateindex.sum.0;
self.vocdd_365d_sma.compute_sma(
self.vocdd_365d_median.compute_rolling_median(
starting_indexes.dateindex,
vocdd_dateindex_sum,
365,
@@ -27,8 +27,8 @@ impl Vecs {
self.hodl_bank.compute_cumulative_transformed_binary(
starting_indexes.dateindex,
price_close,
&self.vocdd_365d_sma,
|price: Close<Dollars>, sma: StoredF64| StoredF64::from(f64::from(price) - f64::from(sma)),
&self.vocdd_365d_median,
|price: Close<Dollars>, median: StoredF64| StoredF64::from(f64::from(price) - f64::from(median)),
exit,
)?;
@@ -47,54 +47,3 @@ impl Vecs {
Ok(())
}
}
#[cfg(test)]
mod tests {
#[test]
fn test_hodl_bank_formula() {
let prices = [100.0, 110.0, 105.0, 120.0, 115.0];
let vocdd_sma = [50.0, 55.0, 52.0, 60.0, 58.0];
let mut hodl_bank = 0.0_f64;
let mut expected = Vec::new();
for i in 0..prices.len() {
hodl_bank += prices[i] - vocdd_sma[i];
expected.push(hodl_bank);
}
assert!((expected[0] - 50.0).abs() < 0.001);
assert!((expected[1] - 105.0).abs() < 0.001);
assert!((expected[2] - 158.0).abs() < 0.001);
assert!((expected[3] - 218.0).abs() < 0.001);
assert!((expected[4] - 275.0).abs() < 0.001);
}
#[test]
fn test_reserve_risk_formula() {
let price = 100.0_f64;
let hodl_bank = 1000.0_f64;
let reserve_risk = price / hodl_bank;
assert!((reserve_risk - 0.1).abs() < 0.0001);
}
#[test]
fn test_reserve_risk_interpretation() {
let high_confidence = 100.0 / 10000.0;
let low_confidence = 100.0 / 100.0;
assert!(high_confidence < low_confidence);
}
#[test]
fn test_hodl_bank_negative_contribution() {
let prices = [100.0, 80.0, 90.0];
let vocdd_sma = [50.0, 100.0, 85.0];
let mut hodl_bank = 0.0_f64;
for i in 0..prices.len() {
hodl_bank += prices[i] - vocdd_sma[i];
}
assert!((hodl_bank - 35.0).abs() < 0.001);
}
}
@@ -12,11 +12,12 @@ impl Vecs {
indexes: &indexes::Vecs,
compute_dollars: bool,
) -> Result<Self> {
let v1 = version + Version::ONE;
Ok(Self {
vocdd_365d_sma: EagerVec::forced_import(db, "vocdd_365d_sma", version)?,
hodl_bank: EagerVec::forced_import(db, "hodl_bank", version)?,
vocdd_365d_median: EagerVec::forced_import(db, "vocdd_365d_median", v1)?,
hodl_bank: EagerVec::forced_import(db, "hodl_bank", v1)?,
reserve_risk: compute_dollars
.then(|| ComputedFromDateLast::forced_import(db, "reserve_risk", version, indexes))
.then(|| ComputedFromDateLast::forced_import(db, "reserve_risk", v1, indexes))
.transpose()?,
})
}
@@ -6,7 +6,7 @@ use crate::internal::ComputedFromDateLast;
#[derive(Clone, Traversable)]
pub struct Vecs {
pub vocdd_365d_sma: EagerVec<PcoVec<DateIndex, StoredF64>>,
pub vocdd_365d_median: EagerVec<PcoVec<DateIndex, StoredF64>>,
pub hodl_bank: EagerVec<PcoVec<DateIndex, StoredF64>>,
pub reserve_risk: Option<ComputedFromDateLast<StoredF64>>,
}
@@ -1,5 +1,6 @@
use brk_error::Result;
use vecdb::Exit;
use brk_types::{Bitcoin, Close, Dollars, StoredF64};
use vecdb::{Exit, TypedVecIterator};
use super::super::activity;
use super::Vecs;
@@ -29,6 +30,15 @@ impl Vecs {
.activity
.coindays_destroyed;
let circulating_supply = &distribution
.utxo_cohorts
.all
.metrics
.supply
.total
.bitcoin
.height;
self.cointime_value_destroyed
.compute_all(indexes, starting_indexes, exit, |vec| {
vec.compute_multiply(
@@ -62,14 +72,27 @@ impl Vecs {
Ok(())
})?;
// VOCDD: Value-weighted Coin Days Destroyed = CDD × price
// This is a key input for Reserve Risk calculation
// VOCDD: Value of Coin Days Destroyed = price × (CDD / circulating_supply)
// Supply-adjusted to account for growing supply over time
// This is a key input for Reserve Risk / HODL Bank calculation
self.vocdd
.compute_all(indexes, starting_indexes, exit, |vec| {
vec.compute_multiply(
let mut supply_iter = circulating_supply.into_iter();
vec.compute_transform2(
starting_indexes.height,
&price.usd.split.close.height,
&coindays_destroyed.height,
|(i, price, cdd, _): (_, Close<Dollars>, StoredF64, _)| {
let supply: Bitcoin = supply_iter.get_unwrap(i);
let supply_f64 = f64::from(supply);
if supply_f64 == 0.0 {
(i, StoredF64::from(0.0))
} else {
// VOCDD = price × (CDD / supply)
let vocdd = f64::from(price) * f64::from(cdd) / supply_f64;
(i, StoredF64::from(vocdd))
}
},
exit,
)?;
Ok(())
@@ -29,7 +29,7 @@ impl Vecs {
vocdd: ComputedFromHeightSumCum::forced_import(
db,
"vocdd",
version,
version + Version::ONE,
indexes,
)?,
})
@@ -1,14 +1,63 @@
use brk_cohort::ByAddressType;
use brk_error::Result;
use brk_traversable::Traversable;
use brk_types::{Height, StoredU64, Version};
use brk_types::{Height, StoredF64, StoredU64, Version};
use derive_more::{Deref, DerefMut};
use rayon::prelude::*;
use vecdb::{
AnyStoredVec, AnyVec, Database, EagerVec, Exit, GenericStoredVec, PcoVec, TypedVecIterator,
};
use crate::{ComputeIndexes, indexes, internal::ComputedFromHeightLast};
use crate::{ComputeIndexes, indexes, internal::{ComputedFromDateLast, ComputedFromHeightLast}};
/// Address count with 30d change metric for a single type.
#[derive(Clone, Traversable)]
pub struct AddrCountVecs {
#[traversable(flatten)]
pub count: ComputedFromHeightLast<StoredU64>,
pub _30d_change: ComputedFromDateLast<StoredF64>,
}
impl AddrCountVecs {
pub fn forced_import(
db: &Database,
name: &str,
version: Version,
indexes: &indexes::Vecs,
) -> Result<Self> {
Ok(Self {
count: ComputedFromHeightLast::forced_import(db, name, version, indexes)?,
_30d_change: ComputedFromDateLast::forced_import(
db,
&format!("{name}_30d_change"),
version,
indexes,
)?,
})
}
pub fn compute_rest(
&mut self,
indexes: &indexes::Vecs,
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
self.count.compute_rest(indexes, starting_indexes, exit)?;
self._30d_change
.compute_all(starting_indexes, exit, |v| {
v.compute_change(
starting_indexes.dateindex,
&*self.count.dateindex,
30,
exit,
)?;
Ok(())
})?;
Ok(())
}
}
/// Address count per address type (runtime state).
#[derive(Debug, Default, Deref, DerefMut)]
@@ -28,47 +77,54 @@ impl From<(&AddressTypeToAddrCountVecs, Height)> for AddressTypeToAddressCount {
Self(ByAddressType {
p2pk65: groups
.p2pk65
.count
.height
.into_iter()
.get_unwrap(prev_height)
.into(),
p2pk33: groups
.p2pk33
.count
.height
.into_iter()
.get_unwrap(prev_height)
.into(),
p2pkh: groups
.p2pkh
.count
.height
.into_iter()
.get_unwrap(prev_height)
.into(),
p2sh: groups
.p2sh
.count
.height
.into_iter()
.get_unwrap(prev_height)
.into(),
p2wpkh: groups
.p2wpkh
.count
.height
.into_iter()
.get_unwrap(prev_height)
.into(),
p2wsh: groups
.p2wsh
.count
.height
.into_iter()
.get_unwrap(prev_height)
.into(),
p2tr: groups
.p2tr
.count
.height
.into_iter()
.get_unwrap(prev_height)
.into(),
p2a: groups.p2a.height.into_iter().get_unwrap(prev_height).into(),
p2a: groups.p2a.count.height.into_iter().get_unwrap(prev_height).into(),
})
} else {
Default::default()
@@ -76,13 +132,13 @@ impl From<(&AddressTypeToAddrCountVecs, Height)> for AddressTypeToAddressCount {
}
}
/// Address count per address type, with height + derived indexes.
/// Address count per address type, with height + derived indexes + 30d change.
#[derive(Clone, Deref, DerefMut, Traversable)]
pub struct AddressTypeToAddrCountVecs(ByAddressType<ComputedFromHeightLast<StoredU64>>);
pub struct AddressTypeToAddrCountVecs(ByAddressType<AddrCountVecs>);
impl From<ByAddressType<ComputedFromHeightLast<StoredU64>>> for AddressTypeToAddrCountVecs {
impl From<ByAddressType<AddrCountVecs>> for AddressTypeToAddrCountVecs {
#[inline]
fn from(value: ByAddressType<ComputedFromHeightLast<StoredU64>>) -> Self {
fn from(value: ByAddressType<AddrCountVecs>) -> Self {
Self(value)
}
}
@@ -95,8 +151,8 @@ impl AddressTypeToAddrCountVecs {
indexes: &indexes::Vecs,
) -> Result<Self> {
Ok(Self::from(
ByAddressType::<ComputedFromHeightLast<StoredU64>>::new_with_name(|type_name| {
ComputedFromHeightLast::forced_import(
ByAddressType::<AddrCountVecs>::new_with_name(|type_name| {
AddrCountVecs::forced_import(
db,
&format!("{type_name}_{name}"),
version,
@@ -108,28 +164,29 @@ impl AddressTypeToAddrCountVecs {
pub fn min_stateful_height(&self) -> usize {
self.p2pk65
.count
.height
.len()
.min(self.p2pk33.height.len())
.min(self.p2pkh.height.len())
.min(self.p2sh.height.len())
.min(self.p2wpkh.height.len())
.min(self.p2wsh.height.len())
.min(self.p2tr.height.len())
.min(self.p2a.height.len())
.min(self.p2pk33.count.height.len())
.min(self.p2pkh.count.height.len())
.min(self.p2sh.count.height.len())
.min(self.p2wpkh.count.height.len())
.min(self.p2wsh.count.height.len())
.min(self.p2tr.count.height.len())
.min(self.p2a.count.height.len())
}
pub fn par_iter_height_mut(&mut self) -> impl ParallelIterator<Item = &mut dyn AnyStoredVec> {
let inner = &mut self.0;
[
&mut inner.p2pk65.height as &mut dyn AnyStoredVec,
&mut inner.p2pk33.height as &mut dyn AnyStoredVec,
&mut inner.p2pkh.height as &mut dyn AnyStoredVec,
&mut inner.p2sh.height as &mut dyn AnyStoredVec,
&mut inner.p2wpkh.height as &mut dyn AnyStoredVec,
&mut inner.p2wsh.height as &mut dyn AnyStoredVec,
&mut inner.p2tr.height as &mut dyn AnyStoredVec,
&mut inner.p2a.height as &mut dyn AnyStoredVec,
&mut inner.p2pk65.count.height as &mut dyn AnyStoredVec,
&mut inner.p2pk33.count.height as &mut dyn AnyStoredVec,
&mut inner.p2pkh.count.height as &mut dyn AnyStoredVec,
&mut inner.p2sh.count.height as &mut dyn AnyStoredVec,
&mut inner.p2wpkh.count.height as &mut dyn AnyStoredVec,
&mut inner.p2wsh.count.height as &mut dyn AnyStoredVec,
&mut inner.p2tr.count.height as &mut dyn AnyStoredVec,
&mut inner.p2a.count.height as &mut dyn AnyStoredVec,
]
.into_par_iter()
}
@@ -140,27 +197,35 @@ impl AddressTypeToAddrCountVecs {
addr_counts: &AddressTypeToAddressCount,
) -> Result<()> {
self.p2pk65
.count
.height
.truncate_push(height, addr_counts.p2pk65.into())?;
self.p2pk33
.count
.height
.truncate_push(height, addr_counts.p2pk33.into())?;
self.p2pkh
.count
.height
.truncate_push(height, addr_counts.p2pkh.into())?;
self.p2sh
.count
.height
.truncate_push(height, addr_counts.p2sh.into())?;
self.p2wpkh
.count
.height
.truncate_push(height, addr_counts.p2wpkh.into())?;
self.p2wsh
.count
.height
.truncate_push(height, addr_counts.p2wsh.into())?;
self.p2tr
.count
.height
.truncate_push(height, addr_counts.p2tr.into())?;
self.p2a
.count
.height
.truncate_push(height, addr_counts.p2a.into())?;
Ok(())
@@ -168,14 +233,14 @@ impl AddressTypeToAddrCountVecs {
pub fn reset_height(&mut self) -> Result<()> {
use vecdb::GenericStoredVec;
self.p2pk65.height.reset()?;
self.p2pk33.height.reset()?;
self.p2pkh.height.reset()?;
self.p2sh.height.reset()?;
self.p2wpkh.height.reset()?;
self.p2wsh.height.reset()?;
self.p2tr.height.reset()?;
self.p2a.height.reset()?;
self.p2pk65.count.height.reset()?;
self.p2pk33.count.height.reset()?;
self.p2pkh.count.height.reset()?;
self.p2sh.count.height.reset()?;
self.p2wpkh.count.height.reset()?;
self.p2wsh.count.height.reset()?;
self.p2tr.count.height.reset()?;
self.p2a.count.height.reset()?;
Ok(())
}
@@ -198,26 +263,26 @@ impl AddressTypeToAddrCountVecs {
pub fn by_height(&self) -> Vec<&EagerVec<PcoVec<Height, StoredU64>>> {
vec![
&self.p2pk65.height,
&self.p2pk33.height,
&self.p2pkh.height,
&self.p2sh.height,
&self.p2wpkh.height,
&self.p2wsh.height,
&self.p2tr.height,
&self.p2a.height,
&self.p2pk65.count.height,
&self.p2pk33.count.height,
&self.p2pkh.count.height,
&self.p2sh.count.height,
&self.p2wpkh.count.height,
&self.p2wsh.count.height,
&self.p2tr.count.height,
&self.p2a.count.height,
]
}
}
#[derive(Clone, Traversable)]
pub struct AddrCountVecs {
pub all: ComputedFromHeightLast<StoredU64>,
pub struct AddrCountsVecs {
pub all: AddrCountVecs,
#[traversable(flatten)]
pub by_addresstype: AddressTypeToAddrCountVecs,
}
impl AddrCountVecs {
impl AddrCountsVecs {
pub fn forced_import(
db: &Database,
name: &str,
@@ -225,22 +290,22 @@ impl AddrCountVecs {
indexes: &indexes::Vecs,
) -> Result<Self> {
Ok(Self {
all: ComputedFromHeightLast::forced_import(db, name, version, indexes)?,
all: AddrCountVecs::forced_import(db, name, version, indexes)?,
by_addresstype: AddressTypeToAddrCountVecs::forced_import(db, name, version, indexes)?,
})
}
pub fn min_stateful_height(&self) -> usize {
self.all.height.len().min(self.by_addresstype.min_stateful_height())
self.all.count.height.len().min(self.by_addresstype.min_stateful_height())
}
pub fn par_iter_height_mut(&mut self) -> impl ParallelIterator<Item = &mut dyn AnyStoredVec> {
rayon::iter::once(&mut self.all.height as &mut dyn AnyStoredVec)
rayon::iter::once(&mut self.all.count.height as &mut dyn AnyStoredVec)
.chain(self.by_addresstype.par_iter_height_mut())
}
pub fn reset_height(&mut self) -> Result<()> {
self.all.height.reset()?;
self.all.count.height.reset()?;
self.by_addresstype.reset_height()?;
Ok(())
}
@@ -251,7 +316,7 @@ impl AddrCountVecs {
total: u64,
addr_counts: &AddressTypeToAddressCount,
) -> Result<()> {
self.all.height.truncate_push(height, total.into())?;
self.all.count.height.truncate_push(height, total.into())?;
self.by_addresstype
.truncate_push_height(height, addr_counts)?;
Ok(())
@@ -268,10 +333,22 @@ impl AddrCountVecs {
let sources = self.by_addresstype.by_height();
self.all
.count
.compute_all(indexes, starting_indexes, exit, |height_vec| {
Ok(height_vec.compute_sum_of_others(starting_indexes.height, &sources, exit)?)
})?;
self.all._30d_change
.compute_all(starting_indexes, exit, |v| {
v.compute_change(
starting_indexes.dateindex,
&*self.all.count.dateindex,
30,
exit,
)?;
Ok(())
})?;
Ok(())
}
}
@@ -11,7 +11,7 @@ use crate::{
internal::{LazyBinaryComputedFromHeightDistribution, RatioU64F32},
};
use super::{AddrCountVecs, NewAddrCountVecs};
use super::{AddrCountsVecs, NewAddrCountVecs};
/// Growth rate by type - lazy ratio with distribution stats
pub type GrowthRateByType =
@@ -31,7 +31,7 @@ impl GrowthRateVecs {
version: Version,
indexes: &indexes::Vecs,
new_addr_count: &NewAddrCountVecs,
addr_count: &AddrCountVecs,
addr_count: &AddrCountsVecs,
) -> Result<Self> {
let all = make_growth_rate(
db,
@@ -39,7 +39,7 @@ impl GrowthRateVecs {
version,
indexes,
&new_addr_count.all.height,
&addr_count.all.height,
&addr_count.all.count.height,
)?;
let by_addresstype: GrowthRateByType = zip2_by_addresstype(
@@ -52,7 +52,7 @@ impl GrowthRateVecs {
version,
indexes,
&new.height,
&addr.height,
&addr.count.height,
)
},
)?;
@@ -8,7 +8,7 @@ mod total_addr_count;
mod type_map;
pub use activity::{AddressActivityVecs, AddressTypeToActivityCounts};
pub use address_count::{AddrCountVecs, AddressTypeToAddressCount};
pub use address_count::{AddrCountsVecs, AddressTypeToAddressCount};
pub use data::AddressesDataVecs;
pub use growth_rate::GrowthRateVecs;
pub use indexes::AnyAddressIndexesVecs;
@@ -8,7 +8,7 @@ use vecdb::{Database, Exit, IterableCloneableVec};
use crate::{ComputeIndexes, indexes, internal::{LazyBinaryComputedFromHeightLast, U64Plus}};
use super::AddrCountVecs;
use super::AddrCountsVecs;
/// Total addresses by type - lazy sum with all derived indexes
pub type TotalAddrCountByType =
@@ -27,15 +27,15 @@ impl TotalAddrCountVecs {
db: &Database,
version: Version,
indexes: &indexes::Vecs,
addr_count: &AddrCountVecs,
empty_addr_count: &AddrCountVecs,
addr_count: &AddrCountsVecs,
empty_addr_count: &AddrCountsVecs,
) -> Result<Self> {
let all = LazyBinaryComputedFromHeightLast::forced_import::<U64Plus>(
db,
"total_addr_count",
version,
addr_count.all.height.boxed_clone(),
empty_addr_count.all.height.boxed_clone(),
addr_count.all.count.height.boxed_clone(),
empty_addr_count.all.count.height.boxed_clone(),
indexes,
)?;
@@ -47,8 +47,8 @@ impl TotalAddrCountVecs {
db,
&format!("{name}_total_addr_count"),
version,
addr.height.boxed_clone(),
empty.height.boxed_clone(),
addr.count.height.boxed_clone(),
empty.count.height.boxed_clone(),
indexes,
)
},
@@ -56,52 +56,43 @@ impl AddressCohorts {
}))
}
/// Apply a function to each aggregate cohort with its source cohorts (in parallel).
fn for_each_aggregate<F>(&mut self, f: F) -> Result<()>
where
F: Fn(&mut AddressCohortVecs, Vec<&AddressCohortVecs>) -> Result<()> + Sync,
{
let by_amount_range = &self.0.amount_range;
let pairs: Vec<_> = self
.0
.ge_amount
.iter_mut()
.chain(self.0.lt_amount.iter_mut())
.map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_amount_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect(),
)
})
.collect();
pairs
.into_par_iter()
.try_for_each(|(vecs, sources)| f(vecs, sources))
}
/// Compute overlapping cohorts from component amount_range cohorts.
///
/// For example, ">=1 BTC" cohort is computed from sum of amount_range cohorts that match.
pub fn compute_overlapping_vecs(
&mut self,
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
let by_amount_range = &self.0.amount_range;
// ge_amount cohorts computed from matching amount_range cohorts
[
self.0
.ge_amount
.par_iter_mut()
.map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_amount_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect::<Vec<_>>(),
)
})
.collect::<Vec<_>>(),
// lt_amount cohorts computed from matching amount_range cohorts
self.0
.lt_amount
.par_iter_mut()
.map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_amount_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect::<Vec<_>>(),
)
})
.collect::<Vec<_>>(),
]
.into_iter()
.flatten()
.try_for_each(|(vecs, components)| {
vecs.compute_from_stateful(starting_indexes, &components, exit)
self.for_each_aggregate(|vecs, sources| {
vecs.compute_from_stateful(starting_indexes, &sources, exit)
})
}
@@ -113,8 +104,24 @@ impl AddressCohorts {
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
// 1. Compute all metrics except net_sentiment
self.par_iter_mut()
.try_for_each(|v| v.compute_rest_part1(indexes, price, starting_indexes, exit))
.try_for_each(|v| v.compute_rest_part1(indexes, price, starting_indexes, exit))?;
// 2. Compute net_sentiment.height for separate cohorts (greed - pain)
self.par_iter_separate_mut()
.try_for_each(|v| v.metrics.compute_net_sentiment_height(starting_indexes, exit))?;
// 3. Compute net_sentiment.height for aggregate cohorts (weighted average)
self.for_each_aggregate(|vecs, sources| {
let metrics: Vec<_> = sources.iter().map(|v| &v.metrics).collect();
vecs.metrics
.compute_net_sentiment_from_others(starting_indexes, &metrics, exit)
})?;
// 4. Compute net_sentiment dateindex for ALL cohorts
self.par_iter_mut()
.try_for_each(|v| v.metrics.compute_net_sentiment_rest(indexes, starting_indexes, exit))
}
/// Second phase of post-processing: compute relative metrics.
@@ -3,13 +3,15 @@ use std::path::Path;
use brk_cohort::{CohortContext, Filter, Filtered};
use brk_error::Result;
use brk_traversable::Traversable;
use brk_types::{CentsUnsigned, DateIndex, Dollars, Height, StoredU64, Version};
use brk_types::{CentsUnsigned, DateIndex, Dollars, Height, StoredF64, StoredU64, Version};
use rayon::prelude::*;
use vecdb::{AnyStoredVec, AnyVec, Database, Exit, GenericStoredVec, IterableVec};
use crate::{
ComputeIndexes, distribution::state::AddressCohortState, indexes, internal::ComputedFromHeightLast,
price,
distribution::state::AddressCohortState,
indexes,
internal::{ComputedFromDateLast, ComputedFromHeightLast},
price, ComputeIndexes,
};
use crate::distribution::metrics::{CohortMetrics, ImportConfig, SupplyMetrics};
@@ -33,6 +35,7 @@ pub struct AddressCohortVecs {
pub metrics: CohortMetrics,
pub addr_count: ComputedFromHeightLast<StoredU64>,
pub addr_count_30d_change: ComputedFromDateLast<StoredF64>,
}
impl AddressCohortVecs {
@@ -79,6 +82,12 @@ impl AddressCohortVecs {
version + VERSION,
indexes,
)?,
addr_count_30d_change: ComputedFromDateLast::forced_import(
db,
&cfg.name("addr_count_30d_change"),
version + VERSION,
indexes,
)?,
})
}
@@ -234,6 +243,18 @@ impl DynCohortVecs for AddressCohortVecs {
) -> Result<()> {
self.addr_count
.compute_rest(indexes, starting_indexes, exit)?;
self.addr_count_30d_change
.compute_all(starting_indexes, exit, |v| {
v.compute_change(
starting_indexes.dateindex,
&*self.addr_count.dateindex,
30,
exit,
)?;
Ok(())
})?;
self.metrics
.compute_rest_part1(indexes, price, starting_indexes, exit)?;
Ok(())
@@ -1,13 +1,15 @@
use std::{cmp::Reverse, collections::BinaryHeap, path::Path};
use std::{cmp::Reverse, collections::BinaryHeap, fs, path::Path};
use brk_cohort::{
AGE_BOUNDARIES, ByAgeRange, ByAmountRange, ByEpoch, ByGreatEqualAmount, ByLowerThanAmount,
ByMaxAge, ByMinAge, BySpendableType, ByTerm, ByYear, Filter, Filtered, StateLevel, UTXOGroups,
ByMaxAge, ByMinAge, BySpendableType, ByTerm, ByYear, Filter, Filtered, StateLevel, TERM_NAMES,
Term, UTXOGroups,
};
use brk_error::Result;
use brk_traversable::Traversable;
use brk_types::{
CentsUnsigned, DateIndex, Dollars, Height, ONE_HOUR_IN_SEC, Sats, StoredF32, Timestamp, Version,
CentsUnsigned, CentsUnsignedCompact, CostBasisDistribution, Date, DateIndex, Dollars, Height,
ONE_HOUR_IN_SEC, Sats, StoredF32, Timestamp, Version,
};
use derive_more::{Deref, DerefMut};
use rayon::prelude::*;
@@ -25,6 +27,9 @@ use super::{super::traits::CohortVecs, vecs::UTXOCohortVecs};
const VERSION: Version = Version::new(0);
/// Significant digits for cost basis prices (after rounding to dollars).
const COST_BASIS_PRICE_DIGITS: i32 = 5;
/// All UTXO cohorts organized by filter type.
#[derive(Clone, Deref, DerefMut, Traversable)]
pub struct UTXOCohorts(pub(crate) UTXOGroups<UTXOCohortVecs>);
@@ -152,70 +157,83 @@ impl UTXOCohorts {
}))
}
/// Apply a function to each aggregate cohort with its source cohorts (in parallel).
fn for_each_aggregate<F>(&mut self, f: F) -> Result<()>
where
F: Fn(&mut UTXOCohortVecs, Vec<&UTXOCohortVecs>) -> Result<()> + Sync,
{
let by_age_range = &self.0.age_range;
let by_amount_range = &self.0.amount_range;
// Build (aggregate, sources) pairs
let pairs: Vec<_> = [(&mut self.0.all, by_age_range.iter().collect::<Vec<_>>())]
.into_iter()
.chain(self.0.min_age.iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_age_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect(),
)
}))
.chain(self.0.max_age.iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_age_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect(),
)
}))
.chain(self.0.term.iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_age_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect(),
)
}))
.chain(self.0.ge_amount.iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_amount_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect(),
)
}))
.chain(self.0.lt_amount.iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_amount_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect(),
)
}))
.collect();
pairs
.into_par_iter()
.try_for_each(|(vecs, sources)| f(vecs, sources))
}
/// Compute overlapping cohorts from component age/amount range cohorts.
pub fn compute_overlapping_vecs(
&mut self,
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
let by_age_range = &self.0.age_range;
let by_amount_range = &self.0.amount_range;
[(&mut self.0.all, by_age_range.iter().collect::<Vec<_>>())]
.into_par_iter()
.chain(self.0.min_age.par_iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_age_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect::<Vec<_>>(),
)
}))
.chain(self.0.max_age.par_iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_age_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect::<Vec<_>>(),
)
}))
.chain(self.0.term.par_iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_age_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect::<Vec<_>>(),
)
}))
.chain(self.0.ge_amount.par_iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_amount_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect::<Vec<_>>(),
)
}))
.chain(self.0.lt_amount.par_iter_mut().map(|vecs| {
let filter = vecs.filter().clone();
(
vecs,
by_amount_range
.iter()
.filter(|other| filter.includes(other.filter()))
.collect::<Vec<_>>(),
)
}))
.try_for_each(|(vecs, components)| {
vecs.compute_from_stateful(starting_indexes, &components, exit)
})
self.for_each_aggregate(|vecs, sources| {
vecs.compute_from_stateful(starting_indexes, &sources, exit)
})
}
/// First phase of post-processing: compute index transforms.
@@ -226,8 +244,24 @@ impl UTXOCohorts {
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
// 1. Compute all metrics except net_sentiment
self.par_iter_mut()
.try_for_each(|v| v.compute_rest_part1(indexes, price, starting_indexes, exit))
.try_for_each(|v| v.compute_rest_part1(indexes, price, starting_indexes, exit))?;
// 2. Compute net_sentiment.height for separate cohorts (greed - pain)
self.par_iter_separate_mut()
.try_for_each(|v| v.metrics.compute_net_sentiment_height(starting_indexes, exit))?;
// 3. Compute net_sentiment.height for aggregate cohorts (weighted average)
self.for_each_aggregate(|vecs, sources| {
let metrics: Vec<_> = sources.iter().map(|v| &v.metrics).collect();
vecs.metrics
.compute_net_sentiment_from_others(starting_indexes, &metrics, exit)
})?;
// 4. Compute net_sentiment dateindex for ALL cohorts
self.par_iter_mut()
.try_for_each(|v| v.metrics.compute_net_sentiment_rest(indexes, starting_indexes, exit))
}
/// Second phase of post-processing: compute relative metrics.
@@ -329,10 +363,12 @@ impl UTXOCohorts {
/// Computes on-demand by merging age_range cohorts' cost_basis_data data.
/// This avoids maintaining redundant aggregate cost_basis_data maps.
/// Computes both sat-weighted (percentiles) and USD-weighted (invested_capital) percentiles.
/// Also writes daily cost basis snapshots to states_path.
pub fn truncate_push_aggregate_percentiles(
&mut self,
dateindex: DateIndex,
spot: Dollars,
states_path: &Path,
) -> Result<()> {
// Collect (filter, entries, total_sats, total_usd) from age_range cohorts.
// Keep data in CentsUnsigned to avoid float conversions until output.
@@ -403,6 +439,7 @@ impl UTXOCohorts {
}
// K-way merge using min-heap: O(n log k) where k = number of cohorts
// Collects merged price->sats map while computing percentiles
let mut heap: BinaryHeap<Reverse<(CentsUnsigned, usize, usize)>> = BinaryHeap::new();
// Initialize heap with first entry from each cohort
@@ -428,6 +465,42 @@ impl UTXOCohorts {
let mut sats_at_price: u64 = 0;
let mut usd_at_price: u128 = 0;
// Collect merged entries during the merge (already in sorted order)
// Pre-allocate with max possible unique prices (actual count likely lower due to dedup)
let max_unique_prices = relevant.iter().map(|e| e.len()).max().unwrap_or(0);
let mut merged: Vec<(CentsUnsignedCompact, Sats)> = Vec::with_capacity(max_unique_prices);
// Finalize a price point: compute percentiles and accumulate for merged vec
let mut finalize_price = |price: CentsUnsigned, sats: u64, usd: u128| {
// Percentile computation uses exact price for accuracy
cumsum_sats += sats;
cumsum_usd += usd;
if sat_idx < PERCENTILES_LEN || usd_idx < PERCENTILES_LEN {
let dollars = price.to_dollars();
while sat_idx < PERCENTILES_LEN && cumsum_sats >= sat_targets[sat_idx] {
sat_result[sat_idx] = dollars;
sat_idx += 1;
}
while usd_idx < PERCENTILES_LEN && cumsum_usd >= usd_targets[usd_idx] {
usd_result[usd_idx] = dollars;
usd_idx += 1;
}
}
// Round to nearest dollar with N significant digits for storage
let rounded: CentsUnsignedCompact = price.round_to_dollar(COST_BASIS_PRICE_DIGITS).into();
// Merge entries with same rounded price using last_mut
if let Some((last_price, last_sats)) = merged.last_mut()
&& *last_price == rounded
{
*last_sats += Sats::from(sats);
} else {
merged.push((rounded, Sats::from(sats)));
}
};
while let Some(Reverse((price, cohort_idx, entry_idx))) = heap.pop() {
let entries = relevant[cohort_idx];
let (_, amount) = entries[entry_idx];
@@ -438,27 +511,7 @@ impl UTXOCohorts {
if let Some(prev_price) = current_price
&& prev_price != price
{
cumsum_sats += sats_at_price;
cumsum_usd += usd_at_price;
// Only convert to dollars if we still need percentiles
if sat_idx < PERCENTILES_LEN || usd_idx < PERCENTILES_LEN {
let prev_dollars = prev_price.to_dollars();
while sat_idx < PERCENTILES_LEN && cumsum_sats >= sat_targets[sat_idx] {
sat_result[sat_idx] = prev_dollars;
sat_idx += 1;
}
while usd_idx < PERCENTILES_LEN && cumsum_usd >= usd_targets[usd_idx] {
usd_result[usd_idx] = prev_dollars;
usd_idx += 1;
}
// Early exit if all percentiles found
if sat_idx >= PERCENTILES_LEN && usd_idx >= PERCENTILES_LEN {
break;
}
}
finalize_price(prev_price, sats_at_price, usd_at_price);
sats_at_price = 0;
usd_at_price = 0;
}
@@ -474,22 +527,9 @@ impl UTXOCohorts {
}
}
// Finalize last price (skip if we already found all percentiles via early exit)
if (sat_idx < PERCENTILES_LEN || usd_idx < PERCENTILES_LEN)
&& let Some(price) = current_price
{
cumsum_sats += sats_at_price;
cumsum_usd += usd_at_price;
let price_dollars = price.to_dollars();
while sat_idx < PERCENTILES_LEN && cumsum_sats >= sat_targets[sat_idx] {
sat_result[sat_idx] = price_dollars;
sat_idx += 1;
}
while usd_idx < PERCENTILES_LEN && cumsum_usd >= usd_targets[usd_idx] {
usd_result[usd_idx] = price_dollars;
usd_idx += 1;
}
// Finalize last price
if let Some(price) = current_price {
finalize_price(price, sats_at_price, usd_at_price);
}
// Push both sat-weighted and USD-weighted results
@@ -510,6 +550,20 @@ impl UTXOCohorts {
spot_pct.dateindex.truncate_push(dateindex, rank)?;
}
// Write daily cost basis snapshot
let cohort_name = match &filter {
Filter::All => "all",
Filter::Term(Term::Sth) => TERM_NAMES.short.id,
Filter::Term(Term::Lth) => TERM_NAMES.long.id,
_ => return Ok(()),
};
let date = Date::from(dateindex);
let dir = states_path.join(format!("utxo_{cohort_name}_cost_basis/by_date"));
fs::create_dir_all(&dir)?;
let path = dir.join(date.to_string());
fs::write(path, CostBasisDistribution::serialize_iter(merged.into_iter())?)?;
Ok(())
})
}
@@ -399,7 +399,7 @@ pub fn process_blocks(
.map(|c| c.to_dollars())
.unwrap_or(Dollars::NAN);
vecs.utxo_cohorts
.truncate_push_aggregate_percentiles(dateindex, spot)?;
.truncate_push_aggregate_percentiles(dateindex, spot, &vecs.states_path)?;
// Compute unrealized peak regret by age range (once per day)
// Aggregate cohorts (all, term, etc.) get values via compute_from_stateful
@@ -296,6 +296,42 @@ impl CohortMetrics {
Ok(())
}
/// Compute net_sentiment.height as capital-weighted average of component cohorts.
///
/// For aggregate cohorts, the simple greed-pain formula produces values outside
/// the range of components due to asymmetric weighting. This computes net_sentiment
/// as a proper weighted average using realized_cap as weight.
///
/// Only computes height; dateindex derivation is done separately via compute_net_sentiment_rest.
pub fn compute_net_sentiment_from_others(
&mut self,
starting_indexes: &ComputeIndexes,
others: &[&Self],
exit: &Exit,
) -> Result<()> {
let Some(unrealized) = self.unrealized.as_mut() else {
return Ok(());
};
let weights: Vec<_> = others
.iter()
.filter_map(|o| Some(&o.realized.as_ref()?.realized_cap.height))
.collect();
let values: Vec<_> = others
.iter()
.filter_map(|o| Some(&o.unrealized.as_ref()?.net_sentiment.height))
.collect();
if weights.len() != others.len() || values.len() != others.len() {
return Ok(());
}
Ok(unrealized
.net_sentiment
.height
.compute_weighted_average_of_others(starting_indexes.height, &weights, &values, exit)?)
}
/// First phase of computed metrics (indexes from height).
pub fn compute_rest_part1(
&mut self,
@@ -350,4 +386,31 @@ impl CohortMetrics {
Ok(())
}
/// Compute net_sentiment.height for separate cohorts (greed - pain).
/// Called only for separate cohorts; aggregates compute via weighted average in compute_from_stateful.
pub fn compute_net_sentiment_height(
&mut self,
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
if let Some(unrealized) = self.unrealized.as_mut() {
unrealized.compute_net_sentiment_height(starting_indexes, exit)?;
}
Ok(())
}
/// Compute net_sentiment dateindex derivation from height.
/// Called for ALL cohorts after height is computed.
pub fn compute_net_sentiment_rest(
&mut self,
indexes: &indexes::Vecs,
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
if let Some(unrealized) = self.unrealized.as_mut() {
unrealized.compute_net_sentiment_rest(indexes, starting_indexes, exit)?;
}
Ok(())
}
}
@@ -1,10 +1,10 @@
use brk_error::Result;
use brk_traversable::Traversable;
use brk_types::{Height, StoredU64};
use brk_types::{Height, StoredF64, StoredU64};
use rayon::prelude::*;
use vecdb::{AnyStoredVec, AnyVec, Exit, GenericStoredVec};
use crate::{ComputeIndexes, indexes, internal::ComputedFromHeightLast};
use crate::{ComputeIndexes, indexes, internal::{ComputedFromDateLast, ComputedFromHeightLast}};
use super::ImportConfig;
@@ -12,6 +12,7 @@ use super::ImportConfig;
#[derive(Clone, Traversable)]
pub struct OutputsMetrics {
pub utxo_count: ComputedFromHeightLast<StoredU64>,
pub utxo_count_30d_change: ComputedFromDateLast<StoredF64>,
}
impl OutputsMetrics {
@@ -24,6 +25,12 @@ impl OutputsMetrics {
cfg.version,
cfg.indexes,
)?,
utxo_count_30d_change: ComputedFromDateLast::forced_import(
cfg.db,
&cfg.name("utxo_count_30d_change"),
cfg.version,
cfg.indexes,
)?,
})
}
@@ -42,7 +49,11 @@ impl OutputsMetrics {
/// Returns a parallel iterator over all vecs for parallel writing.
pub fn par_iter_mut(&mut self) -> impl ParallelIterator<Item = &mut dyn AnyStoredVec> {
vec![&mut self.utxo_count.height as &mut dyn AnyStoredVec].into_par_iter()
vec![
&mut self.utxo_count.height as &mut dyn AnyStoredVec,
&mut self.utxo_count_30d_change.dateindex as &mut dyn AnyStoredVec,
]
.into_par_iter()
}
/// Compute aggregate values from separate cohorts.
@@ -70,6 +81,20 @@ impl OutputsMetrics {
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
self.utxo_count.compute_rest(indexes, starting_indexes, exit)
self.utxo_count
.compute_rest(indexes, starting_indexes, exit)?;
self.utxo_count_30d_change
.compute_all(starting_indexes, exit, |v| {
v.compute_change(
starting_indexes.dateindex,
&*self.utxo_count.dateindex,
30,
exit,
)?;
Ok(())
})?;
Ok(())
}
}
@@ -17,7 +17,8 @@ use crate::{
internal::{
CentsUnsignedToDollars, ComputedFromDateLast, ComputedFromDateRatio,
ComputedFromHeightLast, ComputedFromHeightSum, ComputedFromHeightSumCum, DollarsMinus,
DollarsPlus, LazyBinaryFromHeightSum, LazyBinaryFromHeightSumCum,
DollarsPlus, DollarsSquaredDivide, LazyBinaryFromHeightSum, LazyBinaryFromHeightSumCum,
LazyBinaryPriceFromHeight,
LazyComputedValueFromHeightSumCum, LazyFromDateLast, LazyFromHeightLast, LazyFromHeightSum,
LazyFromHeightSumCum, LazyPriceFromCents, PercentageDollarsF32, PriceFromHeight,
StoredF32Identity, ValueFromDateLast,
@@ -43,6 +44,10 @@ pub struct RealizedMetrics {
pub investor_price: LazyPriceFromCents,
pub investor_price_extra: ComputedFromDateRatio,
// === Floor/Ceiling Price Bands (lazy: realized²/investor, investor²/realized) ===
pub lower_price_band: LazyBinaryPriceFromHeight,
pub upper_price_band: LazyBinaryPriceFromHeight,
// === Raw values for aggregation (needed to compute investor_price for aggregated cohorts) ===
/// Raw Σ(price × sats) for realized cap aggregation
pub cap_raw: BytesVec<Height, CentsSats>,
@@ -286,6 +291,24 @@ impl RealizedMetrics {
extended,
)?;
// Floor price = realized² / investor (lower band)
let lower_price_band =
LazyBinaryPriceFromHeight::from_price_and_lazy_price::<DollarsSquaredDivide>(
&cfg.name("lower_price_band"),
cfg.version,
&realized_price,
&investor_price,
);
// Ceiling price = investor² / realized (upper band)
let upper_price_band =
LazyBinaryPriceFromHeight::from_lazy_price_and_price::<DollarsSquaredDivide>(
&cfg.name("upper_price_band"),
cfg.version,
&investor_price,
&realized_price,
);
// Raw values for aggregation
let cap_raw = BytesVec::forced_import(cfg.db, &cfg.name("cap_raw"), cfg.version)?;
let investor_cap_raw =
@@ -429,6 +452,11 @@ impl RealizedMetrics {
investor_price_cents,
investor_price,
investor_price_extra,
// === Floor/Ceiling Price Bands ===
lower_price_band,
upper_price_band,
cap_raw,
investor_cap_raw,
@@ -5,8 +5,8 @@ use brk_types::{Dollars, Sats, StoredF32, StoredF64, Version};
use vecdb::IterableCloneableVec;
use crate::internal::{
LazyBinaryFromHeightLast, LazyBinaryFromDateLast, NegPercentageDollarsF32, NegRatio32,
PercentageDollarsF32, PercentageSatsF64, Ratio32,
LazyBinaryFromDateLast, LazyBinaryFromHeightLast, NegPercentageDollarsF32,
PercentageDollarsF32, PercentageSatsF64,
};
use super::{ImportConfig, RealizedMetrics, SupplyMetrics, UnrealizedMetrics};
@@ -337,33 +337,33 @@ impl RelativeMetrics {
// === Unrealized vs Own Total Unrealized PnL (lazy, optional) ===
unrealized_profit_rel_to_own_total_unrealized_pnl: extended.then(|| {
LazyBinaryFromHeightLast::from_computed_height_date_and_binary_block::<Ratio32, _, _>(
LazyBinaryFromHeightLast::from_computed_height_date_and_binary_block::<PercentageDollarsF32, _, _>(
&cfg.name("unrealized_profit_rel_to_own_total_unrealized_pnl"),
cfg.version,
cfg.version + v1,
&unrealized.unrealized_profit,
&unrealized.total_unrealized_pnl,
)
}),
unrealized_loss_rel_to_own_total_unrealized_pnl: extended.then(|| {
LazyBinaryFromHeightLast::from_computed_height_date_and_binary_block::<Ratio32, _, _>(
LazyBinaryFromHeightLast::from_computed_height_date_and_binary_block::<PercentageDollarsF32, _, _>(
&cfg.name("unrealized_loss_rel_to_own_total_unrealized_pnl"),
cfg.version,
cfg.version + v1,
&unrealized.unrealized_loss,
&unrealized.total_unrealized_pnl,
)
}),
neg_unrealized_loss_rel_to_own_total_unrealized_pnl: extended.then(|| {
LazyBinaryFromHeightLast::from_computed_height_date_and_binary_block::<NegRatio32, _, _>(
LazyBinaryFromHeightLast::from_computed_height_date_and_binary_block::<NegPercentageDollarsF32, _, _>(
&cfg.name("neg_unrealized_loss_rel_to_own_total_unrealized_pnl"),
cfg.version,
cfg.version + v1,
&unrealized.unrealized_loss,
&unrealized.total_unrealized_pnl,
)
}),
net_unrealized_pnl_rel_to_own_total_unrealized_pnl: extended.then(|| {
LazyBinaryFromHeightLast::from_both_binary_block::<Ratio32, _, _, _, _>(
LazyBinaryFromHeightLast::from_both_binary_block::<PercentageDollarsF32, _, _, _, _>(
&cfg.name("net_unrealized_pnl_rel_to_own_total_unrealized_pnl"),
cfg.version + v1,
cfg.version + v2,
&unrealized.net_unrealized_pnl,
&unrealized.total_unrealized_pnl,
)
@@ -1,6 +1,6 @@
use brk_error::Result;
use brk_traversable::Traversable;
use brk_types::{CentsSats, CentsSquaredSats, CentsUnsigned, DateIndex, Dollars, Height};
use brk_types::{CentsSats, CentsSquaredSats, CentsUnsigned, DateIndex, Dollars, Height, Version};
use rayon::prelude::*;
use vecdb::{
AnyStoredVec, AnyVec, BytesVec, Exit, GenericStoredVec, ImportableVec, Negate,
@@ -150,7 +150,7 @@ impl UnrealizedMetrics {
let net_sentiment = ComputedFromHeightLast::forced_import(
cfg.db,
&cfg.name("net_sentiment"),
cfg.version,
cfg.version + Version::ONE, // v1: weighted average for aggregate cohorts
cfg.indexes,
)?;
@@ -598,17 +598,32 @@ impl UnrealizedMetrics {
)?)
})?;
// Net sentiment: greed - pain
self.net_sentiment
.compute_all(indexes, starting_indexes, exit, |vec| {
Ok(vec.compute_subtract(
starting_indexes.height,
&self.greed_index.height,
&self.pain_index.height,
exit,
)?)
})?;
// Net sentiment height (greed - pain) computed separately for separate cohorts only
// Aggregate cohorts compute it via weighted average in compute_from_stateful
// Dateindex derivation for ALL cohorts happens in compute_net_sentiment_rest
Ok(())
}
/// Compute net_sentiment.height for separate cohorts (greed - pain).
/// Aggregate cohorts skip this - their height is computed via weighted average in compute_from_stateful.
pub fn compute_net_sentiment_height(&mut self, starting_indexes: &ComputeIndexes, exit: &Exit) -> Result<()> {
Ok(self.net_sentiment.height.compute_subtract(
starting_indexes.height,
&self.greed_index.height,
&self.pain_index.height,
exit,
)?)
}
/// Compute net_sentiment dateindex derivation from height.
/// Called for ALL cohorts after height is computed (either via greed-pain or weighted avg).
pub fn compute_net_sentiment_rest(
&mut self,
indexes: &indexes::Vecs,
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
self.net_sentiment.compute_rest(indexes, starting_indexes, exit)
}
}
@@ -6,6 +6,9 @@ use vecdb::unlikely;
use super::{super::cost_basis::RealizedState, base::CohortState};
/// Significant digits for address cost basis prices (after rounding to dollars).
const COST_BASIS_PRICE_DIGITS: i32 = 4;
#[derive(Clone)]
pub struct AddressCohortState {
pub addr_count: u64,
@@ -16,7 +19,8 @@ impl AddressCohortState {
pub fn new(path: &Path, name: &str, compute_dollars: bool) -> Self {
Self {
addr_count: 0,
inner: CohortState::new(path, name, compute_dollars),
inner: CohortState::new(path, name, compute_dollars)
.with_price_rounding(COST_BASIS_PRICE_DIGITS),
}
}
@@ -3,9 +3,7 @@ use std::path::Path;
use brk_error::Result;
use brk_types::{Age, CentsSats, CentsUnsigned, CostBasisSnapshot, Height, Sats, SupplyState};
use super::super::cost_basis::{
CachedUnrealizedState, Percentiles, CostBasisData, RealizedState, UnrealizedState,
};
use super::super::cost_basis::{CostBasisData, Percentiles, RealizedState, UnrealizedState};
#[derive(Clone)]
pub struct CohortState {
@@ -15,7 +13,6 @@ pub struct CohortState {
pub satblocks_destroyed: Sats,
pub satdays_destroyed: Sats,
cost_basis_data: Option<CostBasisData>,
cached_unrealized: Option<CachedUnrealizedState>,
}
impl CohortState {
@@ -27,12 +24,18 @@ impl CohortState {
satblocks_destroyed: Sats::ZERO,
satdays_destroyed: Sats::ZERO,
cost_basis_data: compute_dollars.then_some(CostBasisData::create(path, name)),
cached_unrealized: None,
}
}
/// Enable price rounding for cost basis data.
pub fn with_price_rounding(mut self, digits: i32) -> Self {
if let Some(data) = self.cost_basis_data.take() {
self.cost_basis_data = Some(data.with_price_rounding(digits));
}
self
}
pub fn import_at_or_before(&mut self, height: Height) -> Result<Height> {
self.cached_unrealized = None;
match self.cost_basis_data.as_mut() {
Some(p) => p.import_at_or_before(height),
None => Ok(height),
@@ -55,7 +58,6 @@ impl CohortState {
p.clean()?;
p.init();
}
self.cached_unrealized = None;
Ok(())
}
@@ -66,11 +68,17 @@ impl CohortState {
}
pub fn cost_basis_data_first_key_value(&self) -> Option<(CentsUnsigned, &Sats)> {
self.cost_basis_data.as_ref()?.first_key_value().map(|(k, v)| (k.into(), v))
self.cost_basis_data
.as_ref()?
.first_key_value()
.map(|(k, v)| (k.into(), v))
}
pub fn cost_basis_data_last_key_value(&self) -> Option<(CentsUnsigned, &Sats)> {
self.cost_basis_data.as_ref()?.last_key_value().map(|(k, v)| (k.into(), v))
self.cost_basis_data
.as_ref()?
.last_key_value()
.map(|(k, v)| (k.into(), v))
}
pub fn reset_single_iteration_values(&mut self) {
@@ -102,10 +110,6 @@ impl CohortState {
s.price_sats,
s.investor_cap,
);
if let Some(cache) = self.cached_unrealized.as_mut() {
cache.on_receive(s.realized_price, s.supply_state.value);
}
}
}
@@ -129,10 +133,6 @@ impl CohortState {
s.price_sats,
s.investor_cap,
);
if let Some(cache) = self.cached_unrealized.as_mut() {
cache.on_send(s.realized_price, s.supply_state.value);
}
}
}
@@ -151,16 +151,10 @@ impl CohortState {
realized.receive(price, sats);
self.cost_basis_data.as_mut().unwrap().increment(
price,
sats,
price_sats,
investor_cap,
);
if let Some(cache) = self.cached_unrealized.as_mut() {
cache.on_receive(price, sats);
}
self.cost_basis_data
.as_mut()
.unwrap()
.increment(price, sats, price_sats, investor_cap);
}
}
@@ -185,10 +179,6 @@ impl CohortState {
current.price_sats,
current.investor_cap,
);
if let Some(cache) = self.cached_unrealized.as_mut() {
cache.on_receive(current.realized_price, current.supply_state.value);
}
}
if prev.supply_state.value.is_not_zero() {
@@ -198,10 +188,6 @@ impl CohortState {
prev.price_sats,
prev.investor_cap,
);
if let Some(cache) = self.cached_unrealized.as_mut() {
cache.on_send(prev.realized_price, prev.supply_state.value);
}
}
}
}
@@ -245,10 +231,6 @@ impl CohortState {
prev_ps,
prev_investor_cap,
);
if let Some(cache) = self.cached_unrealized.as_mut() {
cache.on_send(pp, sats);
}
}
}
}
@@ -293,10 +275,6 @@ impl CohortState {
current.price_sats,
current.investor_cap,
);
if let Some(cache) = self.cached_unrealized.as_mut() {
cache.on_receive(current.realized_price, current.supply_state.value);
}
}
if prev.supply_state.value.is_not_zero() {
@@ -306,10 +284,6 @@ impl CohortState {
prev.price_sats,
prev.investor_cap,
);
if let Some(cache) = self.cached_unrealized.as_mut() {
cache.on_send(prev.realized_price, prev.supply_state.value);
}
}
}
}
@@ -324,25 +298,13 @@ impl CohortState {
height_price: CentsUnsigned,
date_price: Option<CentsUnsigned>,
) -> (UnrealizedState, Option<UnrealizedState>) {
let cost_basis_data = match self.cost_basis_data.as_ref() {
Some(p) if !p.is_empty() => p,
_ => return (UnrealizedState::ZERO, date_price.map(|_| UnrealizedState::ZERO)),
};
let date_state = date_price.map(|date_price| {
CachedUnrealizedState::compute_full_standalone(date_price.into(), cost_basis_data)
});
let height_state = if let Some(cache) = self.cached_unrealized.as_mut() {
cache.get_at_price(height_price, cost_basis_data)
} else {
let cache = CachedUnrealizedState::compute_fresh(height_price, cost_basis_data);
let state = cache.current_state();
self.cached_unrealized = Some(cache);
state
};
(height_state, date_state)
match self.cost_basis_data.as_mut() {
Some(p) => p.compute_unrealized_states(height_price, date_price),
None => (
UnrealizedState::ZERO,
date_price.map(|_| UnrealizedState::ZERO),
),
}
}
pub fn write(&mut self, height: Height, cleanup: bool) -> Result<()> {
@@ -353,16 +315,22 @@ impl CohortState {
}
pub fn min_price(&self) -> Option<CentsUnsigned> {
self.cost_basis_data.as_ref()?.first_key_value().map(|(k, _)| k.into())
self.cost_basis_data
.as_ref()?
.first_key_value()
.map(|(k, _)| k.into())
}
pub fn max_price(&self) -> Option<CentsUnsigned> {
self.cost_basis_data.as_ref()?.last_key_value().map(|(k, _)| k.into())
self.cost_basis_data
.as_ref()?
.last_key_value()
.map(|(k, _)| k.into())
}
pub fn cost_basis_data_iter(
&self,
) -> Option<impl Iterator<Item = (CentsUnsigned, &Sats)>> {
self.cost_basis_data.as_ref().map(|p| p.iter().map(|(k, v)| (k.into(), v)))
pub fn cost_basis_data_iter(&self) -> Option<impl Iterator<Item = (CentsUnsigned, &Sats)>> {
self.cost_basis_data
.as_ref()
.map(|p| p.iter().map(|(k, v)| (k.into(), v)))
}
}
@@ -1,22 +1,23 @@
use std::{
collections::BTreeMap,
fs,
ops::Bound,
path::{Path, PathBuf},
};
use brk_error::{Error, Result};
use brk_types::{CentsSats, CentsSquaredSats, CentsUnsigned, CentsUnsignedCompact, Height, Sats};
use pco::{
ChunkConfig,
standalone::{simple_compress, simple_decompress},
use brk_types::{
CentsSats, CentsSquaredSats, CentsUnsigned, CentsUnsignedCompact, CostBasisDistribution,
Height, Sats,
};
use rustc_hash::FxHashMap;
use vecdb::Bytes;
use crate::utils::OptionExt;
use super::Percentiles;
use super::{CachedUnrealizedState, Percentiles, UnrealizedState};
/// Type alias for the price-to-sats map used in cost basis data.
pub(super) type CostBasisMap = BTreeMap<CentsUnsignedCompact, Sats>;
#[derive(Clone, Debug, Default)]
struct PendingRaw {
@@ -32,6 +33,8 @@ pub struct CostBasisData {
state: Option<State>,
pending: FxHashMap<CentsUnsignedCompact, (Sats, Sats)>,
pending_raw: PendingRaw,
cache: Option<CachedUnrealizedState>,
rounding_digits: Option<i32>,
}
const STATE_TO_KEEP: usize = 10;
@@ -43,6 +46,21 @@ impl CostBasisData {
state: None,
pending: FxHashMap::default(),
pending_raw: PendingRaw::default(),
cache: None,
rounding_digits: None,
}
}
pub fn with_price_rounding(mut self, digits: i32) -> Self {
self.rounding_digits = Some(digits);
self
}
#[inline]
fn round_price(&self, price: CentsUnsigned) -> CentsUnsigned {
match self.rounding_digits {
Some(digits) => price.round_to_dollar(digits),
None => price,
}
}
@@ -54,6 +72,7 @@ impl CostBasisData {
self.state = Some(State::deserialize(&fs::read(path)?)?);
self.pending.clear();
self.pending_raw = PendingRaw::default();
self.cache = None;
Ok(height)
}
@@ -73,29 +92,31 @@ impl CostBasisData {
pub fn iter(&self) -> impl Iterator<Item = (CentsUnsignedCompact, &Sats)> {
self.assert_pending_empty();
self.state.u().map.iter().map(|(&k, v)| (k, v))
}
pub fn range(
&self,
bounds: (Bound<CentsUnsignedCompact>, Bound<CentsUnsignedCompact>),
) -> impl Iterator<Item = (CentsUnsignedCompact, &Sats)> {
self.assert_pending_empty();
self.state.u().map.range(bounds).map(|(&k, v)| (k, v))
self.state.u().base.map.iter().map(|(&k, v)| (k, v))
}
pub fn is_empty(&self) -> bool {
self.pending.is_empty() && self.state.u().map.is_empty()
self.pending.is_empty() && self.state.u().base.map.is_empty()
}
pub fn first_key_value(&self) -> Option<(CentsUnsignedCompact, &Sats)> {
self.assert_pending_empty();
self.state.u().map.first_key_value().map(|(&k, v)| (k, v))
self.state
.u()
.base
.map
.first_key_value()
.map(|(&k, v)| (k, v))
}
pub fn last_key_value(&self) -> Option<(CentsUnsignedCompact, &Sats)> {
self.assert_pending_empty();
self.state.u().map.last_key_value().map(|(&k, v)| (k, v))
self.state
.u()
.base
.map
.last_key_value()
.map(|(&k, v)| (k, v))
}
/// Get the exact cap_raw value (not recomputed from map).
@@ -110,7 +131,8 @@ impl CostBasisData {
self.state.u().investor_cap_raw
}
/// Increment with pre-computed typed values
/// Increment with pre-computed typed values.
/// Handles rounding and cache update.
pub fn increment(
&mut self,
price: CentsUnsigned,
@@ -118,14 +140,19 @@ impl CostBasisData {
price_sats: CentsSats,
investor_cap: CentsSquaredSats,
) {
let price = self.round_price(price);
self.pending.entry(price.into()).or_default().0 += sats;
self.pending_raw.cap_inc += price_sats;
if investor_cap != CentsSquaredSats::ZERO {
self.pending_raw.investor_cap_inc += investor_cap;
}
if let Some(cache) = self.cache.as_mut() {
cache.on_receive(price, sats);
}
}
/// Decrement with pre-computed typed values
/// Decrement with pre-computed typed values.
/// Handles rounding and cache update.
pub fn decrement(
&mut self,
price: CentsUnsigned,
@@ -133,16 +160,20 @@ impl CostBasisData {
price_sats: CentsSats,
investor_cap: CentsSquaredSats,
) {
let price = self.round_price(price);
self.pending.entry(price.into()).or_default().1 += sats;
self.pending_raw.cap_dec += price_sats;
if investor_cap != CentsSquaredSats::ZERO {
self.pending_raw.investor_cap_dec += investor_cap;
}
if let Some(cache) = self.cache.as_mut() {
cache.on_send(price, sats);
}
}
pub fn apply_pending(&mut self) {
for (cents, (inc, dec)) in self.pending.drain() {
let entry = self.state.um().map.entry(cents).or_default();
let entry = self.state.um().base.map.entry(cents).or_default();
*entry += inc;
if *entry < dec {
panic!(
@@ -159,7 +190,7 @@ impl CostBasisData {
}
*entry -= dec;
if *entry == Sats::ZERO {
self.state.um().map.remove(&cents);
self.state.um().base.map.remove(&cents);
}
}
@@ -205,6 +236,7 @@ impl CostBasisData {
self.state.replace(State::default());
self.pending.clear();
self.pending_raw = PendingRaw::default();
self.cache = None;
}
pub fn compute_percentiles(&self) -> Option<Percentiles> {
@@ -212,14 +244,49 @@ impl CostBasisData {
Percentiles::compute(self.iter().map(|(k, &v)| (k, v)))
}
pub fn compute_unrealized_states(
&mut self,
height_price: CentsUnsigned,
date_price: Option<CentsUnsigned>,
) -> (UnrealizedState, Option<UnrealizedState>) {
if self.is_empty() {
return (UnrealizedState::ZERO, date_price.map(|_| UnrealizedState::ZERO));
}
let map = &self.state.u().base.map;
let date_state =
date_price.map(|p| CachedUnrealizedState::compute_full_standalone(p.into(), map));
let height_state = if let Some(cache) = self.cache.as_mut() {
cache.get_at_price(height_price, map)
} else {
let cache = CachedUnrealizedState::compute_fresh(height_price, map);
let state = cache.current_state();
self.cache = Some(cache);
state
};
(height_state, date_state)
}
pub fn clean(&mut self) -> Result<()> {
let _ = fs::remove_dir_all(&self.pathbuf);
fs::create_dir_all(&self.pathbuf)?;
fs::create_dir_all(self.path_by_height())?;
self.cache = None;
Ok(())
}
fn path_by_height(&self) -> PathBuf {
self.pathbuf.join("by_height")
}
fn read_dir(&self, keep_only_before: Option<Height>) -> Result<BTreeMap<Height, PathBuf>> {
Ok(fs::read_dir(&self.pathbuf)?
let by_height = self.path_by_height();
if !by_height.exists() {
return Ok(BTreeMap::new());
}
Ok(fs::read_dir(&by_height)?
.filter_map(|entry| {
let path = entry.ok()?.path();
let name = path.file_name()?.to_str()?;
@@ -257,13 +324,13 @@ impl CostBasisData {
}
fn path_state(&self, height: Height) -> PathBuf {
self.pathbuf.join(u32::from(height).to_string())
self.path_by_height().join(height.to_string())
}
}
#[derive(Clone, Default, Debug)]
struct State {
map: BTreeMap<CentsUnsignedCompact, Sats>,
base: CostBasisDistribution,
/// Exact realized cap: Σ(price × sats)
cap_raw: CentsSats,
/// Exact investor cap: Σ(price² × sats)
@@ -271,51 +338,20 @@ struct State {
}
impl State {
fn serialize(&self) -> vecdb::Result<Vec<u8>> {
let keys: Vec<u32> = self.map.keys().map(|k| k.inner()).collect();
let values: Vec<u64> = self.map.values().map(|v| u64::from(*v)).collect();
let config = ChunkConfig::default();
let compressed_keys = simple_compress(&keys, &config)?;
let compressed_values = simple_compress(&values, &config)?;
let mut buffer = Vec::new();
buffer.extend(keys.len().to_bytes());
buffer.extend(compressed_keys.len().to_bytes());
buffer.extend(compressed_values.len().to_bytes());
buffer.extend(compressed_keys);
buffer.extend(compressed_values);
fn serialize(&self) -> Result<Vec<u8>> {
let mut buffer = self.base.serialize()?;
buffer.extend(self.cap_raw.to_bytes());
buffer.extend(self.investor_cap_raw.to_bytes());
Ok(buffer)
}
fn deserialize(data: &[u8]) -> vecdb::Result<Self> {
let entry_count = usize::from_bytes(&data[0..8])?;
let keys_len = usize::from_bytes(&data[8..16])?;
let values_len = usize::from_bytes(&data[16..24])?;
let keys_start = 24;
let values_start = keys_start + keys_len;
let raw_start = values_start + values_len;
let keys: Vec<u32> = simple_decompress(&data[keys_start..values_start])?;
let values: Vec<u64> = simple_decompress(&data[values_start..raw_start])?;
let map: BTreeMap<CentsUnsignedCompact, Sats> = keys
.into_iter()
.zip(values)
.map(|(k, v)| (CentsUnsignedCompact::new(k), Sats::from(v)))
.collect();
assert_eq!(map.len(), entry_count);
let cap_raw = CentsSats::from_bytes(&data[raw_start..raw_start + 16])?;
let investor_cap_raw = CentsSquaredSats::from_bytes(&data[raw_start + 16..raw_start + 32])?;
fn deserialize(data: &[u8]) -> Result<Self> {
let (base, rest) = CostBasisDistribution::deserialize_with_rest(data)?;
let cap_raw = CentsSats::from_bytes(&rest[0..16])?;
let investor_cap_raw = CentsSquaredSats::from_bytes(&rest[16..32])?;
Ok(Self {
map,
base,
cap_raw,
investor_cap_raw,
})
@@ -1,9 +1,12 @@
mod cost_basis_data;
mod data;
mod percentiles;
mod realized;
mod unrealized;
pub use cost_basis_data::*;
pub use data::*;
pub use percentiles::*;
pub use realized::*;
pub use unrealized::*;
pub use unrealized::UnrealizedState;
// Internal use only
pub(super) use unrealized::CachedUnrealizedState;
@@ -2,7 +2,7 @@ use std::ops::Bound;
use brk_types::{CentsUnsigned, CentsUnsignedCompact, Sats};
use super::cost_basis_data::CostBasisData;
use super::CostBasisMap;
#[derive(Debug, Default, Clone)]
pub struct UnrealizedState {
@@ -91,9 +91,7 @@ impl CachedStateRaw {
unrealized_profit: CentsUnsigned::new(
(self.unrealized_profit / Sats::ONE_BTC_U128) as u64,
),
unrealized_loss: CentsUnsigned::new(
(self.unrealized_loss / Sats::ONE_BTC_U128) as u64,
),
unrealized_loss: CentsUnsigned::new((self.unrealized_loss / Sats::ONE_BTC_U128) as u64),
invested_capital_in_profit: CentsUnsigned::new(
(self.invested_capital_in_profit / Sats::ONE_BTC_U128) as u64,
),
@@ -115,10 +113,13 @@ pub struct CachedUnrealizedState {
}
impl CachedUnrealizedState {
pub fn compute_fresh(price: CentsUnsigned, cost_basis_data: &CostBasisData) -> Self {
pub fn compute_fresh(price: CentsUnsigned, map: &CostBasisMap) -> Self {
let price: CentsUnsignedCompact = price.into();
let state = Self::compute_raw(price, cost_basis_data);
Self { state, at_price: price }
let state = Self::compute_raw(price, map);
Self {
state,
at_price: price,
}
}
/// Get the current cached state as output (without price update).
@@ -129,11 +130,11 @@ impl CachedUnrealizedState {
pub fn get_at_price(
&mut self,
new_price: CentsUnsigned,
cost_basis_data: &CostBasisData,
map: &CostBasisMap,
) -> UnrealizedState {
let new_price: CentsUnsignedCompact = new_price.into();
if new_price != self.at_price {
self.update_for_price_change(new_price, cost_basis_data);
self.update_for_price_change(new_price, map);
}
self.state.to_output()
}
@@ -186,11 +187,7 @@ impl CachedUnrealizedState {
}
}
fn update_for_price_change(
&mut self,
new_price: CentsUnsignedCompact,
cost_basis_data: &CostBasisData,
) {
fn update_for_price_change(&mut self, new_price: CentsUnsignedCompact, map: &CostBasisMap) {
let old_price = self.at_price;
if new_price > old_price {
@@ -201,8 +198,7 @@ impl CachedUnrealizedState {
// First, process UTXOs crossing from loss to profit
// Range (old_price, new_price] means: old_price < price <= new_price
for (price, &sats) in
cost_basis_data.range((Bound::Excluded(old_price), Bound::Included(new_price)))
for (&price, &sats) in map.range((Bound::Excluded(old_price), Bound::Included(new_price)))
{
let sats_u128 = sats.as_u128();
let price_u128 = price.as_u128();
@@ -233,8 +229,7 @@ impl CachedUnrealizedState {
// Non-crossing profit UTXOs: their profit increases by delta
self.state.unrealized_profit += delta * original_supply_in_profit;
// Non-crossing loss UTXOs: their loss decreases by delta
let non_crossing_loss_sats =
self.state.supply_in_loss.as_u128(); // Already excludes crossing
let non_crossing_loss_sats = self.state.supply_in_loss.as_u128(); // Already excludes crossing
self.state.unrealized_loss -= delta * non_crossing_loss_sats;
} else if new_price < old_price {
let delta = (old_price - new_price).as_u128();
@@ -244,8 +239,7 @@ impl CachedUnrealizedState {
// First, process UTXOs crossing from profit to loss
// Range (new_price, old_price] means: new_price < price <= old_price
for (price, &sats) in
cost_basis_data.range((Bound::Excluded(new_price), Bound::Included(old_price)))
for (&price, &sats) in map.range((Bound::Excluded(new_price), Bound::Included(old_price)))
{
let sats_u128 = sats.as_u128();
let price_u128 = price.as_u128();
@@ -276,22 +270,18 @@ impl CachedUnrealizedState {
// Non-crossing loss UTXOs: their loss increases by delta
self.state.unrealized_loss += delta * original_supply_in_loss;
// Non-crossing profit UTXOs: their profit decreases by delta
let non_crossing_profit_sats =
self.state.supply_in_profit.as_u128(); // Already excludes crossing
let non_crossing_profit_sats = self.state.supply_in_profit.as_u128(); // Already excludes crossing
self.state.unrealized_profit -= delta * non_crossing_profit_sats;
}
self.at_price = new_price;
}
/// Compute raw cached state from cost_basis_data.
fn compute_raw(
current_price: CentsUnsignedCompact,
cost_basis_data: &CostBasisData,
) -> CachedStateRaw {
/// Compute raw cached state from the map.
fn compute_raw(current_price: CentsUnsignedCompact, map: &CostBasisMap) -> CachedStateRaw {
let mut state = CachedStateRaw::default();
for (price, &sats) in cost_basis_data.iter() {
for (&price, &sats) in map.iter() {
let sats_u128 = sats.as_u128();
let price_u128 = price.as_u128();
let invested_capital = price_u128 * sats_u128;
@@ -321,8 +311,8 @@ impl CachedUnrealizedState {
/// Used for date_state which doesn't use the cache.
pub fn compute_full_standalone(
current_price: CentsUnsignedCompact,
cost_basis_data: &CostBasisData,
map: &CostBasisMap,
) -> UnrealizedState {
Self::compute_raw(current_price, cost_basis_data).to_output()
Self::compute_raw(current_price, map).to_output()
}
}
+9 -6
View File
@@ -1,4 +1,4 @@
use std::path::Path;
use std::path::{Path, PathBuf};
use brk_error::Result;
use brk_indexer::Indexer;
@@ -25,7 +25,7 @@ use crate::{
use super::{
AddressCohorts, AddressesDataVecs, AnyAddressIndexesVecs, UTXOCohorts,
address::{
AddrCountVecs, AddressActivityVecs, GrowthRateVecs, NewAddrCountVecs, TotalAddrCountVecs,
AddrCountsVecs, AddressActivityVecs, GrowthRateVecs, NewAddrCountVecs, TotalAddrCountVecs,
},
compute::aggregates,
};
@@ -37,6 +37,8 @@ const VERSION: Version = Version::new(22);
pub struct Vecs {
#[traversable(skip)]
db: Database,
#[traversable(skip)]
pub states_path: PathBuf,
pub supply_state: BytesVec<Height, SupplyState>,
pub any_address_indexes: AnyAddressIndexesVecs,
@@ -44,8 +46,8 @@ pub struct Vecs {
pub utxo_cohorts: UTXOCohorts,
pub address_cohorts: AddressCohorts,
pub addr_count: AddrCountVecs,
pub empty_addr_count: AddrCountVecs,
pub addr_count: AddrCountsVecs,
pub empty_addr_count: AddrCountsVecs,
pub address_activity: AddressActivityVecs,
/// Total addresses ever seen (addr_count + empty_addr_count) - lazy, global + per-type
@@ -115,9 +117,9 @@ impl Vecs {
|index, _| Some(index),
);
let addr_count = AddrCountVecs::forced_import(&db, "addr_count", version, indexes)?;
let addr_count = AddrCountsVecs::forced_import(&db, "addr_count", version, indexes)?;
let empty_addr_count =
AddrCountVecs::forced_import(&db, "empty_addr_count", version, indexes)?;
AddrCountsVecs::forced_import(&db, "empty_addr_count", version, indexes)?;
let address_activity =
AddressActivityVecs::forced_import(&db, "address_activity", version, indexes)?;
@@ -163,6 +165,7 @@ impl Vecs {
emptyaddressindex,
db,
states_path,
};
this.db.retain_regions(
@@ -457,6 +457,88 @@ where
}
}
/// Create from a ComputedFromHeightLast (block last with derived dates) and a LazyFromHeightLast.
pub fn from_block_last_and_lazy_block_last<F, S2SourceT>(
name: &str,
version: Version,
source1: &ComputedFromHeightLast<S1T>,
source2: &LazyFromHeightLast<S2T, S2SourceT>,
) -> Self
where
F: BinaryTransform<S1T, S2T, T>,
S1T: NumericValue,
S2SourceT: ComputedVecValue + JsonSchema,
{
let v = version + VERSION;
macro_rules! period {
($p:ident) => {
LazyBinaryTransformLast::from_vecs::<F>(
name,
v,
source1.$p.boxed_clone(),
source2.$p.boxed_clone(),
)
};
}
Self {
dateindex: LazyVecFrom2::transformed::<F>(
name,
v,
source1.dateindex.boxed_clone(),
source2.dateindex.boxed_clone(),
),
weekindex: period!(weekindex),
monthindex: period!(monthindex),
quarterindex: period!(quarterindex),
semesterindex: period!(semesterindex),
yearindex: period!(yearindex),
decadeindex: period!(decadeindex),
}
}
/// Create from a LazyFromHeightLast and a ComputedFromHeightLast (reversed source order).
pub fn from_lazy_block_last_and_block_last<F, S1SourceT>(
name: &str,
version: Version,
source1: &LazyFromHeightLast<S1T, S1SourceT>,
source2: &ComputedFromHeightLast<S2T>,
) -> Self
where
F: BinaryTransform<S1T, S2T, T>,
S2T: NumericValue,
S1SourceT: ComputedVecValue + JsonSchema,
{
let v = version + VERSION;
macro_rules! period {
($p:ident) => {
LazyBinaryTransformLast::from_vecs::<F>(
name,
v,
source1.$p.boxed_clone(),
source2.$p.boxed_clone(),
)
};
}
Self {
dateindex: LazyVecFrom2::transformed::<F>(
name,
v,
source1.dateindex.boxed_clone(),
source2.dateindex.boxed_clone(),
),
weekindex: period!(weekindex),
monthindex: period!(monthindex),
quarterindex: period!(quarterindex),
semesterindex: period!(semesterindex),
yearindex: period!(yearindex),
decadeindex: period!(decadeindex),
}
}
/// Create from a LazyDateDerivedLast source and a BinaryDateLast source.
pub fn from_derived_last_and_binary_last<F, S2aT, S2bT>(
name: &str,
@@ -7,7 +7,7 @@ use brk_types::{
use schemars::JsonSchema;
use vecdb::{IterableBoxedVec, IterableCloneableVec, UnaryTransform};
use crate::internal::{ComputedFromHeightLast, ComputedFromDateLast, ComputedVecValue, LazyDateDerivedLast, LazyTransformLast, NumericValue};
use crate::internal::{ComputedFromHeightLast, ComputedFromDateLast, ComputedVecValue, LazyBinaryFromDateLast, LazyDateDerivedLast, LazyTransformLast, NumericValue};
const VERSION: Version = Version::ZERO;
@@ -84,4 +84,34 @@ where
{
Self::from_derived::<F>(name, version, source.dateindex.boxed_clone(), &source.dates)
}
/// Create by unary-transforming a LazyBinaryFromDateLast source.
pub fn from_binary<F, S1aT, S1bT>(
name: &str,
version: Version,
source: &LazyBinaryFromDateLast<S1T, S1aT, S1bT>,
) -> Self
where
F: UnaryTransform<S1T, T>,
S1aT: ComputedVecValue + JsonSchema,
S1bT: ComputedVecValue + JsonSchema,
{
let v = version + VERSION;
macro_rules! period {
($p:ident) => {
LazyTransformLast::from_boxed::<F>(name, v, source.$p.boxed_clone())
};
}
Self {
dateindex: period!(dateindex),
weekindex: period!(weekindex),
monthindex: period!(monthindex),
quarterindex: period!(quarterindex),
semesterindex: period!(semesterindex),
yearindex: period!(yearindex),
decadeindex: period!(decadeindex),
}
}
}
@@ -2,6 +2,8 @@
//!
//! Both dollars and sats are computed from the same source.
use std::marker::PhantomData;
use brk_traversable::Traversable;
use brk_types::{Dollars, SatsFract, Version};
use derive_more::{Deref, DerefMut};
@@ -28,7 +30,7 @@ where
}
/// Composed transform: ST -> Dollars -> SatsFract
pub struct ComposedDollarsToSatsFract<F>(std::marker::PhantomData<F>);
pub struct ComposedDollarsToSatsFract<F>(PhantomData<F>);
impl<F, ST> UnaryTransform<ST, SatsFract> for ComposedDollarsToSatsFract<F>
where
@@ -80,6 +80,58 @@ where
}
}
pub fn from_block_last_and_lazy_block_last<F, S2SourceT>(
name: &str,
version: Version,
source1: &ComputedFromHeightLast<S1T>,
source2: &LazyFromHeightLast<S2T, S2SourceT>,
) -> Self
where
F: BinaryTransform<S1T, S2T, T>,
S1T: NumericValue,
S2SourceT: ComputedVecValue + JsonSchema,
{
let v = version + VERSION;
Self {
height: LazyVecFrom2::transformed::<F>(
name,
v,
source1.height.boxed_clone(),
source2.height.boxed_clone(),
),
rest: LazyBinaryHeightDerivedLast::from_block_last_and_lazy_block_last::<F, _>(
name, v, source1, source2,
),
}
}
pub fn from_lazy_block_last_and_block_last<F, S1SourceT>(
name: &str,
version: Version,
source1: &LazyFromHeightLast<S1T, S1SourceT>,
source2: &ComputedFromHeightLast<S2T>,
) -> Self
where
F: BinaryTransform<S1T, S2T, T>,
S2T: NumericValue,
S1SourceT: ComputedVecValue + JsonSchema,
{
let v = version + VERSION;
Self {
height: LazyVecFrom2::transformed::<F>(
name,
v,
source1.height.boxed_clone(),
source2.height.boxed_clone(),
),
rest: LazyBinaryHeightDerivedLast::from_lazy_block_last_and_block_last::<F, _>(
name, v, source1, source2,
),
}
}
pub fn from_computed_height_date_last<F: BinaryTransform<S1T, S2T, T>>(
name: &str,
version: Version,
@@ -0,0 +1,72 @@
//! Fully lazy binary price wrapper with both USD and sats representations.
//!
//! All levels (height, dateindex, date periods, difficultyepoch) are lazy.
//! Derives dateindex from the two source dateindexes rather than storing it.
use brk_traversable::Traversable;
use brk_types::{CentsUnsigned, Dollars, SatsFract, Version};
use derive_more::{Deref, DerefMut};
use vecdb::BinaryTransform;
use crate::internal::{
DollarsToSatsFract, LazyBinaryFromHeightLast, LazyFromHeightLast, LazyPriceFromCents,
PriceFromHeight,
};
/// Fully lazy binary price metric with both USD and sats representations.
///
/// Dollars: lazy binary transform at all levels (height, dateindex, date periods, difficultyepoch).
/// Sats: lazy unary transform of dollars.
#[derive(Clone, Deref, DerefMut, Traversable)]
#[traversable(merge)]
pub struct LazyBinaryPriceFromHeight {
#[deref]
#[deref_mut]
#[traversable(flatten)]
pub dollars: LazyBinaryFromHeightLast<Dollars, Dollars, Dollars>,
pub sats: LazyFromHeightLast<SatsFract, Dollars>,
}
impl LazyBinaryPriceFromHeight {
/// Create from a PriceFromHeight (source1) and a LazyPriceFromCents (source2).
pub fn from_price_and_lazy_price<F: BinaryTransform<Dollars, Dollars, Dollars>>(
name: &str,
version: Version,
source1: &PriceFromHeight,
source2: &LazyPriceFromCents,
) -> Self {
let dollars = LazyBinaryFromHeightLast::from_block_last_and_lazy_block_last::<
F,
CentsUnsigned,
>(name, version, &source1.dollars, &source2.dollars);
let sats = LazyFromHeightLast::from_binary::<DollarsToSatsFract, _, _>(
&format!("{name}_sats"),
version,
&dollars,
);
Self { dollars, sats }
}
/// Create from a LazyPriceFromCents (source1) and a PriceFromHeight (source2).
pub fn from_lazy_price_and_price<F: BinaryTransform<Dollars, Dollars, Dollars>>(
name: &str,
version: Version,
source1: &LazyPriceFromCents,
source2: &PriceFromHeight,
) -> Self {
let dollars = LazyBinaryFromHeightLast::from_lazy_block_last_and_block_last::<
F,
CentsUnsigned,
>(name, version, &source1.dollars, &source2.dollars);
let sats = LazyFromHeightLast::from_binary::<DollarsToSatsFract, _, _>(
&format!("{name}_sats"),
version,
&dollars,
);
Self { dollars, sats }
}
}
@@ -8,7 +8,8 @@ use vecdb::{IterableBoxedVec, IterableCloneableVec, LazyVecFrom1, UnaryTransform
use crate::internal::{
ComputedFromHeightAndDateLast, ComputedFromHeightLast, ComputedHeightDerivedLast,
ComputedVecValue, LazyBinaryComputedFromHeightLast, LazyHeightDerivedLast, NumericValue,
ComputedVecValue, LazyBinaryComputedFromHeightLast, LazyBinaryFromHeightLast,
LazyHeightDerivedLast, NumericValue,
};
#[derive(Clone, Deref, DerefMut, Traversable)]
#[traversable(merge)]
@@ -96,4 +97,22 @@ where
rest: LazyHeightDerivedLast::from_derived_computed::<F>(name, v, &source.rest),
}
}
/// Create by unary-transforming a LazyBinaryFromHeightLast source.
pub fn from_binary<F, S1aT, S1bT>(
name: &str,
version: Version,
source: &LazyBinaryFromHeightLast<S1T, S1aT, S1bT>,
) -> Self
where
F: UnaryTransform<S1T, T>,
S1aT: ComputedVecValue + JsonSchema,
S1bT: ComputedVecValue + JsonSchema,
{
let v = version + VERSION;
Self {
height: LazyVecFrom1::transformed::<F>(name, v, source.height.boxed_clone()),
rest: LazyHeightDerivedLast::from_binary::<F, _, _>(name, v, &source.rest),
}
}
}
@@ -5,29 +5,30 @@ mod binary_sum_cum;
mod distribution;
mod full;
mod last;
mod lazy_distribution;
mod lazy_full;
mod lazy_transform_distribution;
mod lazy_binary_computed_distribution;
mod lazy_binary_computed_full;
mod lazy_binary_computed_last;
mod lazy_binary_computed_sum;
mod lazy_binary_computed_sum_cum;
mod lazy_binary_price;
mod lazy_computed_full;
mod lazy_computed_sum_cum;
mod lazy_distribution;
mod lazy_full;
mod lazy_last;
mod lazy_price_from_cents;
mod lazy_sum;
mod price;
mod unary_last;
mod lazy_sum_cum;
mod lazy_transform_distribution;
mod lazy_value;
mod price;
mod sum;
mod sum_cum;
mod unary_last;
mod value_binary;
mod value_full;
mod value_last;
mod value_lazy_binary_last;
mod lazy_value;
mod value_lazy_computed_sum_cum;
mod value_lazy_last;
mod value_lazy_sum_cum;
@@ -41,29 +42,30 @@ pub use binary_sum_cum::*;
pub use distribution::*;
pub use full::*;
pub use last::*;
pub use lazy_distribution::*;
pub use lazy_full::*;
pub use lazy_transform_distribution::*;
pub use lazy_binary_computed_distribution::*;
pub use lazy_binary_computed_full::*;
pub use lazy_binary_computed_last::*;
pub use lazy_binary_computed_sum::*;
pub use lazy_binary_computed_sum_cum::*;
pub use lazy_binary_price::*;
pub use lazy_computed_full::*;
pub use lazy_computed_sum_cum::*;
pub use lazy_distribution::*;
pub use lazy_full::*;
pub use lazy_last::*;
pub use lazy_price_from_cents::*;
pub use lazy_sum::*;
pub use price::*;
pub use unary_last::*;
pub use lazy_sum_cum::*;
pub use lazy_transform_distribution::*;
pub use lazy_value::*;
pub use price::*;
pub use sum::*;
pub use sum_cum::*;
pub use unary_last::*;
pub use value_binary::*;
pub use value_full::*;
pub use value_last::*;
pub use value_lazy_binary_last::*;
pub use lazy_value::*;
pub use value_lazy_computed_sum_cum::*;
pub use value_lazy_last::*;
pub use value_lazy_sum_cum::*;
@@ -86,6 +86,32 @@ where
}
}
pub fn from_lazy_block_last_and_block_last<F, S1SourceT>(
name: &str,
version: Version,
source1: &LazyFromHeightLast<S1T, S1SourceT>,
source2: &ComputedFromHeightLast<S2T>,
) -> Self
where
F: BinaryTransform<S1T, S2T, T>,
S2T: NumericValue,
S1SourceT: ComputedVecValue + JsonSchema,
{
let v = version + VERSION;
Self {
dates: LazyBinaryFromDateLast::from_lazy_block_last_and_block_last::<F, _>(
name, v, source1, source2,
),
difficultyepoch: LazyBinaryTransformLast::from_vecs::<F>(
name,
v,
source1.rest.difficultyepoch.boxed_clone(),
source2.rest.difficultyepoch.boxed_clone(),
),
}
}
pub fn from_computed_height_date_last<F: BinaryTransform<S1T, S2T, T>>(
name: &str,
version: Version,
@@ -114,6 +140,32 @@ where
}
}
pub fn from_block_last_and_lazy_block_last<F, S2SourceT>(
name: &str,
version: Version,
source1: &ComputedFromHeightLast<S1T>,
source2: &LazyFromHeightLast<S2T, S2SourceT>,
) -> Self
where
F: BinaryTransform<S1T, S2T, T>,
S1T: NumericValue,
S2SourceT: ComputedVecValue + JsonSchema,
{
let v = version + VERSION;
Self {
dates: LazyBinaryFromDateLast::from_block_last_and_lazy_block_last::<F, _>(
name, v, source1, source2,
),
difficultyepoch: LazyBinaryTransformLast::from_vecs::<F>(
name,
v,
source1.rest.difficultyepoch.boxed_clone(),
source2.rest.difficultyepoch.boxed_clone(),
),
}
}
pub fn from_computed_height_date_and_block_last<F: BinaryTransform<S1T, S2T, T>>(
name: &str,
version: Version,
@@ -8,7 +8,7 @@ use vecdb::{IterableCloneableVec, UnaryTransform};
use crate::internal::{
ComputedFromHeightLast, ComputedHeightDerivedLast, ComputedFromHeightAndDateLast, ComputedVecValue,
LazyFromDateLast, LazyTransformLast, NumericValue,
LazyBinaryHeightDerivedLast, LazyFromDateLast, LazyTransformLast, NumericValue,
};
#[derive(Clone, Deref, DerefMut, Traversable)]
@@ -81,6 +81,29 @@ where
}
}
/// Create by unary-transforming a LazyBinaryHeightDerivedLast source.
pub fn from_binary<F, S1aT, S1bT>(
name: &str,
version: Version,
source: &LazyBinaryHeightDerivedLast<S1T, S1aT, S1bT>,
) -> Self
where
F: UnaryTransform<S1T, T>,
S1aT: ComputedVecValue + JsonSchema,
S1bT: ComputedVecValue + JsonSchema,
{
let v = version + VERSION;
Self {
dates: LazyFromDateLast::from_binary::<F, _, _>(name, v, &source.dates),
difficultyepoch: LazyTransformLast::from_boxed::<F>(
name,
v,
source.difficultyepoch.boxed_clone(),
),
}
}
pub fn from_computed_height_date<F: UnaryTransform<S1T, T>>(
name: &str,
version: Version,
@@ -0,0 +1,18 @@
use brk_types::Dollars;
use vecdb::BinaryTransform;
/// (Dollars, Dollars) -> Dollars: a² / b
pub struct DollarsSquaredDivide;
impl BinaryTransform<Dollars, Dollars, Dollars> for DollarsSquaredDivide {
#[inline(always)]
fn apply(a: Dollars, b: Dollars) -> Dollars {
let af = f64::from(a);
let bf = f64::from(b);
if bf == 0.0 {
Dollars::NAN
} else {
Dollars::from(af * af / bf)
}
}
}
@@ -4,10 +4,11 @@ mod close_price_times_sats;
mod difference_f32;
mod dollar_halve;
mod dollar_identity;
mod dollars_to_sats_fract;
mod dollar_minus;
mod dollar_plus;
mod dollar_times_tenths;
mod dollars_squared_divide;
mod dollars_to_sats_fract;
mod f32_identity;
mod half_close_price_times_sats;
mod ohlc;
@@ -19,7 +20,6 @@ mod percentage_u32_f32;
mod percentage_u64_f32;
mod price_times_ratio;
mod ratio32;
mod ratio32_neg;
mod ratio_f32;
mod ratio_u64_f32;
mod return_f32_tenths;
@@ -47,10 +47,11 @@ pub use close_price_times_sats::*;
pub use difference_f32::*;
pub use dollar_halve::*;
pub use dollar_identity::*;
pub use dollars_to_sats_fract::*;
pub use dollar_minus::*;
pub use dollar_plus::*;
pub use dollar_times_tenths::*;
pub use dollars_squared_divide::*;
pub use dollars_to_sats_fract::*;
pub use f32_identity::*;
pub use half_close_price_times_sats::*;
pub use ohlc::*;
@@ -61,10 +62,9 @@ pub use percentage_sats_f64::*;
pub use percentage_u32_f32::*;
pub use percentage_u64_f32::*;
pub use price_times_ratio::*;
pub use ratio32::*;
pub use ratio32_neg::*;
pub use ratio_f32::*;
pub use ratio_u64_f32::*;
pub use ratio32::*;
pub use return_f32_tenths::*;
pub use return_i8::*;
pub use return_u16::*;
@@ -79,7 +79,7 @@ pub use sat_to_bitcoin::*;
pub use sats_times_close_price::*;
pub use u16_to_years::*;
pub use u64_plus::*;
pub use volatility_sqrt7::*;
pub use volatility_sqrt30::*;
pub use volatility_sqrt365::*;
pub use volatility_sqrt7::*;
pub use weight_to_fullness::*;
@@ -1,13 +0,0 @@
use brk_types::{Dollars, StoredF32};
use vecdb::BinaryTransform;
/// (Dollars, Dollars) -> -StoredF32 (negated ratio)
/// Computes -(a/b) directly to avoid lazy-from-lazy chains.
pub struct NegRatio32;
impl BinaryTransform<Dollars, Dollars, StoredF32> for NegRatio32 {
#[inline(always)]
fn apply(numerator: Dollars, denominator: Dollars) -> StoredF32 {
-StoredF32::from(numerator / denominator)
}
}
+27 -16
View File
@@ -1,7 +1,8 @@
use brk_error::Result;
use brk_types::{Bitcoin, CheckedSub, Close, Date, DateIndex, Dollars, Sats, StoredF32};
use vecdb::{
AnyStoredVec, AnyVec, EagerVec, Exit, GenericStoredVec, IterableVec, PcoVec, VecIndex, Version,
AnyStoredVec, AnyVec, EagerVec, Exit, GenericStoredVec, IterableVec, PcoVec, VecIndex, VecValue,
Version,
};
mod pricing;
@@ -295,37 +296,47 @@ where
}
pub trait ComputeDrawdown<I> {
fn compute_drawdown(
fn compute_drawdown<C, A>(
&mut self,
max_from: I,
close: &impl IterableVec<I, Close<Dollars>>,
ath: &impl IterableVec<I, Dollars>,
current: &impl IterableVec<I, C>,
ath: &impl IterableVec<I, A>,
exit: &Exit,
) -> Result<()>;
) -> Result<()>
where
C: VecValue,
A: VecValue,
f64: From<C> + From<A>;
}
impl<I> ComputeDrawdown<I> for EagerVec<PcoVec<I, StoredF32>>
where
I: VecIndex,
{
fn compute_drawdown(
fn compute_drawdown<C, A>(
&mut self,
max_from: I,
close: &impl IterableVec<I, Close<Dollars>>,
ath: &impl IterableVec<I, Dollars>,
current: &impl IterableVec<I, C>,
ath: &impl IterableVec<I, A>,
exit: &Exit,
) -> Result<()> {
) -> Result<()>
where
C: VecValue,
A: VecValue,
f64: From<C> + From<A>,
{
self.compute_transform2(
max_from,
current,
ath,
close,
|(i, ath, close, _)| {
if ath == Dollars::ZERO {
(i, StoredF32::default())
|(i, current, ath, _)| {
let ath_f64 = f64::from(ath);
let drawdown = if ath_f64 == 0.0 {
StoredF32::default()
} else {
let drawdown = StoredF32::from((*ath - **close) / *ath * -100.0);
(i, drawdown)
}
StoredF32::from((f64::from(current) - ath_f64) / ath_f64 * 100.0)
};
(i, drawdown)
},
exit,
)?;
+2
View File
@@ -13,6 +13,7 @@ bitcoincore-rpc = ["dep:bitcoincore-rpc"]
fjall = ["dep:fjall"]
jiff = ["dep:jiff"]
minreq = ["dep:minreq"]
pco = ["dep:pco"]
serde_json = ["dep:serde_json"]
tokio = ["dep:tokio"]
vecdb = ["dep:vecdb"]
@@ -23,6 +24,7 @@ bitcoincore-rpc = { workspace = true, optional = true }
fjall = { workspace = true, optional = true }
jiff = { workspace = true, optional = true }
minreq = { workspace = true, optional = true }
pco = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
thiserror = "2.0"
tokio = { workspace = true, optional = true }
+4
View File
@@ -58,6 +58,10 @@ pub enum Error {
#[error(transparent)]
BitcoinHexToArrayError(#[from] bitcoin::hex::HexToArrayError),
#[cfg(feature = "pco")]
#[error(transparent)]
Pco(#[from] pco::errors::PcoError),
#[cfg(feature = "serde_json")]
#[error(transparent)]
SerdeJSON(#[from] serde_json::Error),
-10
View File
@@ -78,8 +78,6 @@ impl<'a> BlockProcessor<'a> {
pub fn store_transaction_metadata(&mut self, txs: Vec<ComputedTx>) -> Result<()> {
let height = self.height;
let mut inserted = 0usize;
let mut skipped = 0usize;
for ct in txs {
if ct.prev_txindex_opt.is_none() {
@@ -88,9 +86,6 @@ impl<'a> BlockProcessor<'a> {
ct.txindex,
height,
);
inserted += 1;
} else {
skipped += 1;
}
self.vecs
@@ -123,11 +118,6 @@ impl<'a> BlockProcessor<'a> {
.checked_push(ct.txindex, StoredBool::from(ct.tx.is_explicitly_rbf()))?;
}
tracing::debug!(
"store_transaction_metadata: height={}, inserted={}, skipped={}",
height, inserted, skipped
);
Ok(())
}
}
+101
View File
@@ -0,0 +1,101 @@
use std::{fs, path::PathBuf};
use brk_error::{Error, Result};
use brk_types::{
CostBasisBucket, CostBasisDistribution, CostBasisFormatted, CostBasisValue, Date, DateIndex,
};
use vecdb::IterableVec;
use crate::Query;
impl Query {
/// List available cohorts for cost basis distribution.
pub fn cost_basis_cohorts(&self) -> Result<Vec<String>> {
let states_path = &self.computer().distribution.states_path;
let mut cohorts: Vec<String> = fs::read_dir(states_path)?
.filter_map(|entry| {
let name = entry.ok()?.file_name().into_string().ok()?;
let cohort = name.strip_prefix("utxo_")?.strip_suffix("_cost_basis")?;
states_path
.join(&name)
.join("by_date")
.exists()
.then(|| cohort.to_string())
})
.collect();
cohorts.sort();
Ok(cohorts)
}
fn cost_basis_dir(&self, cohort: &str) -> Result<PathBuf> {
let dir = self
.computer()
.distribution
.states_path
.join(format!("utxo_{cohort}_cost_basis/by_date"));
if !dir.exists() {
return Err(Error::NotFound(format!("Unknown cohort '{cohort}'")));
}
Ok(dir)
}
/// Get the cost basis distribution for a cohort on a specific date.
pub fn cost_basis_distribution(
&self,
cohort: &str,
date: Date,
) -> Result<CostBasisDistribution> {
let path = self.cost_basis_dir(cohort)?.join(date.to_string());
if !path.exists() {
return Err(Error::NotFound(format!(
"No data for cohort '{cohort}' on {date}"
)));
}
CostBasisDistribution::deserialize(&fs::read(&path)?)
}
/// List available dates for a cohort's cost basis distribution.
pub fn cost_basis_dates(&self, cohort: &str) -> Result<Vec<Date>> {
let dir = self.cost_basis_dir(cohort)?;
let mut dates: Vec<Date> = fs::read_dir(&dir)?
.filter_map(|entry| entry.ok()?.file_name().to_str()?.parse().ok())
.collect();
dates.sort();
Ok(dates)
}
/// Get the formatted cost basis distribution.
pub fn cost_basis_formatted(
&self,
cohort: &str,
date: Date,
bucket: CostBasisBucket,
value: CostBasisValue,
) -> Result<CostBasisFormatted> {
let distribution = self.cost_basis_distribution(cohort, date)?;
let dateindex =
DateIndex::try_from(date).map_err(|e| Error::Parse(e.to_string()))?;
let price = self
.computer()
.price
.as_ref()
.ok_or_else(|| Error::NotFound("Price data not available".to_string()))?;
let spot = *price
.cents
.split
.dateindex
.close
.iter()
.get(dateindex)
.ok_or_else(|| Error::NotFound(format!("No price data for {date}")))?;
Ok(distribution.format(bucket, value, spot))
}
}
+1
View File
@@ -1,5 +1,6 @@
mod address;
mod block;
mod cost_basis;
mod mempool;
mod metrics;
mod metrics_legacy;
+78 -1
View File
@@ -9,7 +9,8 @@ use axum::{
};
use brk_traversable::TreeNode;
use brk_types::{
DataRangeFormat, Index, IndexInfo, LimitParam, Metric, MetricCount, MetricData, MetricParam,
CostBasisCohortParam, CostBasisFormatted, CostBasisParams, CostBasisQuery, DataRangeFormat,
Date, Index, IndexInfo, LimitParam, Metric, MetricCount, MetricData, MetricParam,
MetricSelection, MetricSelectionLegacy, MetricWithIndex, Metrics, PaginatedMetrics, Pagination,
};
@@ -291,5 +292,81 @@ impl ApiMetricsRoutes for ApiRouter<AppState> {
.not_modified(),
),
)
// Cost basis distribution endpoints
.api_route(
"/api/metrics/cost-basis",
get_with(
async |headers: HeaderMap, State(state): State<AppState>| {
state
.cached_json(&headers, CacheStrategy::Static, |q| q.cost_basis_cohorts())
.await
},
|op| {
op.id("get_cost_basis_cohorts")
.metrics_tag()
.summary("Available cost basis cohorts")
.description("List available cohorts for cost basis distribution.")
.ok_response::<Vec<String>>()
.server_error()
},
),
)
.api_route(
"/api/metrics/cost-basis/{cohort}/dates",
get_with(
async |headers: HeaderMap,
Path(params): Path<CostBasisCohortParam>,
State(state): State<AppState>| {
state
.cached_json(&headers, CacheStrategy::Height, move |q| {
q.cost_basis_dates(&params.cohort)
})
.await
},
|op| {
op.id("get_cost_basis_dates")
.metrics_tag()
.summary("Available cost basis dates")
.description("List available dates for a cohort's cost basis distribution.")
.ok_response::<Vec<Date>>()
.not_found()
.server_error()
},
),
)
.api_route(
"/api/metrics/cost-basis/{cohort}/{date}",
get_with(
async |headers: HeaderMap,
Path(params): Path<CostBasisParams>,
Query(query): Query<CostBasisQuery>,
State(state): State<AppState>| {
state
.cached_json(&headers, CacheStrategy::Static, move |q| {
q.cost_basis_formatted(
&params.cohort,
params.date,
query.bucket,
query.value,
)
})
.await
},
|op| {
op.id("get_cost_basis")
.metrics_tag()
.summary("Cost basis distribution")
.description(
"Get the cost basis distribution for a cohort on a specific date.\n\n\
Query params:\n\
- `bucket`: raw (default), lin200, lin500, lin1000, log10, log50, log100\n\
- `value`: supply (default, in BTC), realized (USD), unrealized (USD)",
)
.ok_response::<CostBasisFormatted>()
.not_found()
.server_error()
},
),
)
}
}
+3 -1
View File
@@ -9,13 +9,15 @@ repository.workspace = true
[dependencies]
bitcoin = { workspace = true }
brk_error = { workspace = true, features = ["bitcoin", "jiff", "serde_json", "vecdb"] }
brk_error = { workspace = true, features = ["bitcoin", "jiff", "pco", "serde_json", "vecdb"] }
byteview = { workspace = true }
derive_more = { workspace = true }
indexmap = { workspace = true }
itoa = "1.0.17"
jiff = { workspace = true }
pco = { workspace = true }
rapidhash = "4.2.1"
rustc-hash = { workspace = true }
ryu = "1.0.22"
schemars = { workspace = true }
serde = { workspace = true }
+18
View File
@@ -180,6 +180,24 @@ impl Div<usize> for CentsSigned {
}
}
impl From<CentsSigned> for i128 {
#[inline]
fn from(value: CentsSigned) -> Self {
value.0 as i128
}
}
impl From<i128> for CentsSigned {
#[inline]
fn from(value: i128) -> Self {
debug_assert!(
value >= i64::MIN as i128 && value <= i64::MAX as i128,
"i128 overflow to CentsSigned"
);
Self(value as i64)
}
}
impl From<u128> for CentsSigned {
#[inline]
fn from(value: u128) -> Self {
+36
View File
@@ -17,6 +17,7 @@ use super::{CentsSats, Dollars, Sats};
Eq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
Pco,
@@ -61,6 +62,41 @@ impl CentsUnsigned {
pub fn to_dollars(self) -> Dollars {
Dollars::from(self.0 as f64 / 100.0)
}
/// Round to N significant digits.
/// E.g., 12345 (= $123.45) with round_to(4) → 12350 (= $123.50)
/// E.g., 12345 (= $123.45) with round_to(3) → 12300 (= $123.00)
pub fn round_to(self, digits: i32) -> Self {
let v = self.0;
let ilog10 = v.checked_ilog10().unwrap_or(0) as i32;
if ilog10 >= digits {
let log_diff = ilog10 - digits + 1;
let pow = 10u64.pow(log_diff as u32);
// Add half for rounding
Self(((v + pow / 2) / pow) * pow)
} else {
self
}
}
/// Round to nearest dollar, then apply N significant digits.
/// E.g., 12345 (= $123.45) → 12300 (= $123.00) with 5 digits
/// E.g., 1234567 (= $12345.67) → 1234600 (= $12346.00) with 5 digits
#[inline]
pub fn round_to_dollar(self, digits: i32) -> Self {
// Round to nearest dollar (nearest 100 cents)
let dollars = (self.0 + 50) / 100;
// Apply significant digit rounding to dollars, then convert back to cents
let ilog10 = dollars.checked_ilog10().unwrap_or(0) as i32;
let rounded_dollars = if ilog10 >= digits {
let log_diff = ilog10 - digits + 1;
let pow = 10u64.pow(log_diff as u32);
((dollars + pow / 2) / pow) * pow
} else {
dollars
};
Self(rounded_dollars * 100)
}
}
impl From<Dollars> for CentsUnsigned {
+38 -1
View File
@@ -1,12 +1,13 @@
use std::ops::Sub;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use super::{CentsUnsigned, Dollars};
/// Compact unsigned cents (u32) - memory-efficient for map keys.
/// Supports values from $0.00 to $42,949,672.95 (u32::MAX / 100).
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, JsonSchema)]
pub struct CentsUnsignedCompact(u32);
impl CentsUnsignedCompact {
@@ -42,6 +43,42 @@ impl CentsUnsignedCompact {
pub fn saturating_sub(self, rhs: Self) -> Self {
Self(self.0.saturating_sub(rhs.0))
}
/// Round to N significant digits.
/// E.g., 12345 (= $123.45) with round_to(4) → 12350 (= $123.50)
/// E.g., 12345 (= $123.45) with round_to(3) → 12300 (= $123.00)
#[inline]
pub fn round_to(self, digits: i32) -> Self {
let v = self.0;
let ilog10 = v.checked_ilog10().unwrap_or(0) as i32;
if ilog10 >= digits {
let log_diff = ilog10 - digits + 1;
let pow = 10u32.pow(log_diff as u32);
// Add half for rounding
Self(((v + pow / 2) / pow) * pow)
} else {
self
}
}
/// Round to nearest dollar, then apply N significant digits.
/// E.g., 12345 (= $123.45) → 12300 (= $123.00) with 5 digits
/// E.g., 1234567 (= $12345.67) → 1234600 (= $12346.00) with 5 digits
#[inline]
pub fn round_to_dollar(self, digits: i32) -> Self {
// Round to nearest dollar (nearest 100 cents)
let dollars = (self.0 + 50) / 100;
// Apply significant digit rounding to dollars, then convert back to cents
let ilog10 = dollars.checked_ilog10().unwrap_or(0) as i32;
let rounded_dollars = if ilog10 >= digits {
let log_diff = ilog10 - digits + 1;
let pow = 10u32.pow(log_diff as u32);
((dollars + pow / 2) / pow) * pow
} else {
dollars
};
Self(rounded_dollars * 100)
}
}
impl From<Dollars> for CentsUnsignedCompact {
+72
View File
@@ -0,0 +1,72 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use strum::Display;
use crate::CentsUnsigned;
/// Bucket type for cost basis aggregation.
/// Options: raw (no aggregation), lin200/lin500/lin1000 (linear $200/$500/$1000),
/// log10/log50/log100/log200 (logarithmic with 10/50/100/200 buckets per decade).
#[derive(
Debug, Display, Clone, Copy, Default, PartialEq, Eq, Deserialize, Serialize, JsonSchema,
)]
#[serde(rename_all = "lowercase")]
#[strum(serialize_all = "lowercase")]
pub enum CostBasisBucket {
#[default]
Raw,
Lin200,
Lin500,
Lin1000,
Log10,
Log50,
Log100,
Log200,
}
impl CostBasisBucket {
/// Returns the linear bucket size in cents, if this is a linear bucket type.
fn linear_size_cents(&self) -> Option<u64> {
match self {
Self::Lin200 => Some(20_000),
Self::Lin500 => Some(50_000),
Self::Lin1000 => Some(100_000),
_ => None,
}
}
/// Returns the number of buckets per decade, if this is a log bucket type.
fn log_buckets_per_decade(&self) -> Option<u32> {
match self {
Self::Log10 => Some(10),
Self::Log50 => Some(50),
Self::Log100 => Some(100),
Self::Log200 => Some(200),
_ => None,
}
}
/// Compute bucket floor for a given price in cents.
/// Returns None for Raw (no bucketing).
pub fn bucket_floor(&self, price_cents: CentsUnsigned) -> Option<CentsUnsigned> {
match self {
Self::Raw => None,
Self::Lin200 | Self::Lin500 | Self::Lin1000 => {
let size = self.linear_size_cents().unwrap();
Some((price_cents / size) * size)
}
Self::Log10 | Self::Log50 | Self::Log100 | Self::Log200 => {
if price_cents == CentsUnsigned::ZERO {
return Some(CentsUnsigned::ZERO);
}
let n = self.log_buckets_per_decade().unwrap();
// Bucket index = floor(n * log10(price))
// Floor = 10^(bucket_index / n)
let log_price = f64::from(price_cents).log10();
let bucket_idx = (n as f64 * log_price).floor() as i32;
let floor = 10_f64.powf(bucket_idx as f64 / n as f64);
Some(CentsUnsigned::from(floor.round() as u64))
}
}
}
}
@@ -0,0 +1,126 @@
use std::collections::BTreeMap;
use rustc_hash::FxHashMap;
use brk_error::Result;
use pco::{ChunkConfig, standalone::{simple_compress, simple_decompress}};
use schemars::JsonSchema;
use serde::Serialize;
use vecdb::Bytes;
use crate::{Bitcoin, CentsUnsigned, CentsUnsignedCompact, CostBasisBucket, CostBasisValue, Dollars, Sats};
/// Cost basis distribution: a map of price (cents) to sats.
#[derive(Debug, Clone, Default, Serialize, JsonSchema)]
pub struct CostBasisDistribution {
pub map: BTreeMap<CentsUnsignedCompact, Sats>,
}
/// Formatted cost basis output.
/// Key: price floor in USD (dollars).
/// Value: BTC (for supply) or USD (for realized/unrealized).
pub type CostBasisFormatted = BTreeMap<Dollars, f64>;
impl CostBasisDistribution {
/// Deserialize from the pco-compressed format, returning remaining bytes.
pub fn deserialize_with_rest(data: &[u8]) -> Result<(Self, &[u8])> {
let entry_count = usize::from_bytes(&data[0..8])?;
let keys_len = usize::from_bytes(&data[8..16])?;
let values_len = usize::from_bytes(&data[16..24])?;
let keys_start = 24;
let values_start = keys_start + keys_len;
let rest_start = values_start + values_len;
let keys: Vec<u32> = simple_decompress(&data[keys_start..values_start])?;
let values: Vec<u64> = simple_decompress(&data[values_start..rest_start])?;
let map: BTreeMap<CentsUnsignedCompact, Sats> = keys
.into_iter()
.zip(values)
.map(|(k, v)| (CentsUnsignedCompact::new(k), Sats::from(v)))
.collect();
assert_eq!(map.len(), entry_count);
Ok((Self { map }, &data[rest_start..]))
}
/// Deserialize from the pco-compressed format.
pub fn deserialize(data: &[u8]) -> Result<Self> {
Self::deserialize_with_rest(data).map(|(s, _)| s)
}
/// Serialize to the pco-compressed format.
pub fn serialize(&self) -> Result<Vec<u8>> {
Self::serialize_iter(self.map.iter().map(|(&k, &v)| (k, v)))
}
/// Serialize from a sorted iterator of (price, sats) pairs.
pub fn serialize_iter(iter: impl Iterator<Item = (CentsUnsignedCompact, Sats)>) -> Result<Vec<u8>> {
let entries: Vec<_> = iter.collect();
let keys: Vec<u32> = entries.iter().map(|(k, _)| k.inner()).collect();
let values: Vec<u64> = entries.iter().map(|(_, v)| u64::from(*v)).collect();
let config = ChunkConfig::default();
let compressed_keys = simple_compress(&keys, &config)?;
let compressed_values = simple_compress(&values, &config)?;
let mut buffer = Vec::new();
buffer.extend(keys.len().to_bytes());
buffer.extend(compressed_keys.len().to_bytes());
buffer.extend(compressed_values.len().to_bytes());
buffer.extend(compressed_keys);
buffer.extend(compressed_values);
Ok(buffer)
}
/// Format the distribution with optional bucketing and value transformation.
///
/// - `bucket`: How to aggregate prices (raw, linear, or logarithmic)
/// - `value`: What value to compute (supply, realized, or unrealized)
/// - `spot_cents`: Current spot price in cents (required for unrealized)
pub fn format(
&self,
bucket: CostBasisBucket,
value: CostBasisValue,
spot_cents: CentsUnsigned,
) -> CostBasisFormatted {
let spot = Dollars::from(spot_cents);
let needs_realized = value == CostBasisValue::Realized;
let mut result: FxHashMap<CentsUnsigned, (Sats, Dollars)> =
FxHashMap::with_capacity_and_hasher(self.map.len(), Default::default());
// Aggregate into buckets
for (&price_cents, &sats) in &self.map {
let price_cents_u = CentsUnsigned::from(price_cents);
let bucket_key = match bucket {
CostBasisBucket::Raw => price_cents_u,
_ => bucket.bucket_floor(price_cents_u).unwrap_or(price_cents_u),
};
let entry = result.entry(bucket_key).or_insert((Sats::ZERO, Dollars::ZERO));
entry.0 += sats;
// Only compute realized value if needed
if needs_realized {
entry.1 += Dollars::from(price_cents_u) * sats;
}
}
// Convert to final output based on value type
result
.into_iter()
.map(|(cents, (sats, realized))| {
let k = Dollars::from(cents);
let v = match value {
CostBasisValue::Supply => f64::from(Bitcoin::from(sats)),
CostBasisValue::Realized => f64::from(realized),
CostBasisValue::Unrealized => f64::from((spot - k) * sats),
};
(k, v)
})
.collect()
}
}
+55
View File
@@ -0,0 +1,55 @@
use std::{fmt, ops::Deref};
use schemars::JsonSchema;
use serde::Deserialize;
use crate::{CostBasisBucket, CostBasisValue, Date};
/// Cohort identifier for cost basis distribution.
#[derive(Deserialize, JsonSchema)]
#[schemars(example = &"all", example = &"sth", example = &"lth")]
pub struct Cohort(String);
impl fmt::Display for Cohort {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.0)
}
}
impl<T: Into<String>> From<T> for Cohort {
fn from(s: T) -> Self {
Self(s.into())
}
}
impl Deref for Cohort {
type Target = str;
fn deref(&self) -> &Self::Target {
&self.0
}
}
/// Path parameters for cost basis distribution endpoint.
#[derive(Deserialize, JsonSchema)]
pub struct CostBasisParams {
pub cohort: Cohort,
#[schemars(with = "String", example = &"2024-01-01")]
pub date: Date,
}
/// Path parameters for cost basis dates endpoint.
#[derive(Deserialize, JsonSchema)]
pub struct CostBasisCohortParam {
pub cohort: Cohort,
}
/// Query parameters for cost basis distribution endpoint.
#[derive(Deserialize, JsonSchema)]
pub struct CostBasisQuery {
/// Bucket type for aggregation. Default: raw (no aggregation).
#[serde(default)]
pub bucket: CostBasisBucket,
/// Value type to return. Default: supply.
#[serde(default)]
pub value: CostBasisValue,
}
+15
View File
@@ -0,0 +1,15 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use strum::Display;
/// Value type for cost basis distribution.
/// Options: supply (BTC), realized (USD, price × supply), unrealized (USD, spot × supply).
#[derive(Debug, Display, Clone, Copy, Default, PartialEq, Eq, Deserialize, Serialize, JsonSchema)]
#[serde(rename_all = "lowercase")]
#[strum(serialize_all = "lowercase")]
pub enum CostBasisValue {
#[default]
Supply,
Realized,
Unrealized,
}
+16 -1
View File
@@ -1,4 +1,4 @@
use std::fmt;
use std::{fmt, str::FromStr};
use jiff::{Span, Zoned, civil::Date as Date_, tz::TimeZone};
use schemars::JsonSchema;
@@ -250,6 +250,21 @@ impl fmt::Display for Date {
}
}
impl FromStr for Date {
type Err = &'static str;
/// Parse a date from YYYY-MM-DD format.
fn from_str(s: &str) -> Result<Self, Self::Err> {
if s.len() != 10 || s.as_bytes()[4] != b'-' || s.as_bytes()[7] != b'-' {
return Err("expected YYYY-MM-DD format");
}
let year: u16 = s[0..4].parse().map_err(|_| "invalid year")?;
let month: u8 = s[5..7].parse().map_err(|_| "invalid month")?;
let day: u8 = s[8..10].parse().map_err(|_| "invalid day")?;
Ok(Self::new(year, month, day))
}
}
impl Formattable for Date {
#[inline(always)]
fn may_need_escaping() -> bool {
+3 -3
View File
@@ -270,9 +270,9 @@ impl Mul<Sats> for Dollars {
if self.is_nan() {
self
} else {
Self::from(CentsSigned::from(
u128::from(rhs) * u128::from(CentsSigned::from(self)) / Sats::ONE_BTC_U128,
))
let cents = i128::from(CentsSigned::from(self));
let sats = rhs.as_u128() as i128;
Self::from(CentsSigned::from(sats * cents / Sats::ONE_BTC_U128 as i128))
}
}
}
+8
View File
@@ -40,6 +40,10 @@ mod cents_signed;
mod cents_squared_sats;
mod cents_unsigned;
mod cents_unsigned_compact;
mod cost_basis_bucket;
mod cost_basis_distribution;
mod cost_basis_params;
mod cost_basis_value;
mod datarange;
mod datarangeformat;
mod date;
@@ -216,6 +220,10 @@ pub use cents_signed::*;
pub use cents_squared_sats::*;
pub use cents_unsigned::*;
pub use cents_unsigned_compact::*;
pub use cost_basis_bucket::*;
pub use cost_basis_distribution::*;
pub use cost_basis_params::*;
pub use cost_basis_value::*;
pub use datarange::*;
pub use datarangeformat::*;
pub use date::*;
+8 -1
View File
@@ -10,7 +10,7 @@ use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use vecdb::{CheckedSub, Formattable, Pco, PrintableIndex};
use crate::{Bitcoin, Dollars};
use crate::{Bitcoin, Dollars, StoredU64};
/// Fixed-size 64-bit floating point value optimized for on-disk storage
#[derive(Debug, Deref, Default, Clone, Copy, Serialize, Deserialize, Pco, JsonSchema)]
@@ -48,6 +48,13 @@ impl From<usize> for StoredF64 {
}
}
impl From<StoredU64> for StoredF64 {
#[inline]
fn from(value: StoredU64) -> Self {
Self(*value as f64)
}
}
impl CheckedSub<StoredF64> for StoredF64 {
fn checked_sub(self, rhs: Self) -> Option<Self> {
Some(Self(self.0 - rhs.0))
+35 -11
View File
@@ -1,34 +1,58 @@
use std::path::Path;
use axum::{body::Body, extract::State, http::Response};
use axum::{
body::Body,
extract::State,
http::{HeaderMap, Response, StatusCode},
};
use crate::{HeaderMapExtended, Result, Website};
pub async fn file_handler(
State(website): State<Website>,
headers: HeaderMap,
path: axum::extract::Path<String>,
) -> Result<Response<Body>> {
serve(&website, &path.0)
serve(&website, &path.0, &headers)
}
pub async fn index_handler(State(website): State<Website>) -> Result<Response<Body>> {
serve(&website, "")
pub async fn index_handler(
State(website): State<Website>,
headers: HeaderMap,
) -> Result<Response<Body>> {
serve(&website, "", &headers)
}
fn serve(website: &Website, path: &str) -> Result<Response<Body>> {
fn serve(website: &Website, path: &str, request_headers: &HeaderMap) -> Result<Response<Body>> {
let path = sanitize(path);
let content = website.get_file(&path)?;
let is_html =
path.is_empty() || Path::new(&path).extension().is_none() || path.ends_with(".html");
// Etag 304 check (release mode, HTML only)
if is_html
&& let Some(etag) = website.index_etag()
&& request_headers.has_etag(etag)
{
let mut response = Response::builder()
.status(StatusCode::NOT_MODIFIED)
.body(Body::empty())
.unwrap();
let headers = response.headers_mut();
headers.insert_etag(etag);
headers.insert_cache_control_must_revalidate();
return Ok(response);
}
let content = website.get_file(&path)?;
let mut response = Response::new(Body::from(content));
let headers = response.headers_mut();
// Empty path or no extension = index.html (SPA fallback)
let is_html = path.is_empty()
|| Path::new(&path).extension().is_none()
|| path.ends_with(".html");
if is_html {
headers.insert_content_type_text_html();
if let Some(etag) = website.index_etag() {
headers.insert_etag(etag);
}
} else {
headers.insert_content_type(Path::new(&path));
}
+11
View File
@@ -3,6 +3,8 @@ use std::path::Path;
use axum::http::{HeaderMap, header};
pub trait HeaderMapExtended {
fn has_etag(&self, etag: &str) -> bool;
fn insert_etag(&mut self, etag: &str);
fn insert_cache_control_must_revalidate(&mut self);
fn insert_cache_control_immutable(&mut self);
fn insert_content_type(&mut self, path: &Path);
@@ -10,6 +12,15 @@ pub trait HeaderMapExtended {
}
impl HeaderMapExtended for HeaderMap {
fn has_etag(&self, etag: &str) -> bool {
self.get(header::IF_NONE_MATCH)
.is_some_and(|v| v == etag)
}
fn insert_etag(&mut self, etag: &str) {
self.insert(header::ETAG, etag.parse().unwrap());
}
fn insert_cache_control_must_revalidate(&mut self) {
self.insert(
header::CACHE_CONTROL,
+47 -22
View File
@@ -1,5 +1,6 @@
use std::{
fs,
hash::{DefaultHasher, Hash, Hasher},
path::{Path, PathBuf},
str::FromStr,
sync::OnceLock,
@@ -15,8 +16,13 @@ use crate::{Error, Result};
/// Embedded website assets
pub static EMBEDDED_WEBSITE: Dir = include_dir!("$CARGO_MANIFEST_DIR/website");
struct CachedIndex {
html: Vec<u8>,
etag: String,
}
/// Cached index.html with importmap injected
static INDEX_HTML: OnceLock<String> = OnceLock::new();
static INDEX_HTML: OnceLock<CachedIndex> = OnceLock::new();
/// Website configuration:
/// - `true` or omitted: serve embedded website
@@ -35,6 +41,14 @@ impl Website {
!matches!(self, Self::Disabled)
}
/// Returns the cached index.html etag (None in debug mode or before first request)
pub fn index_etag(&self) -> Option<&str> {
if cfg!(debug_assertions) {
return None;
}
INDEX_HTML.get().map(|cached| cached.etag.as_str())
}
/// Returns the filesystem path if available, None means use embedded
pub fn filesystem_path(&self) -> Option<PathBuf> {
match self {
@@ -96,35 +110,46 @@ impl Website {
}
// Release mode: cache with importmap
let html = INDEX_HTML.get_or_init(|| match self.filesystem_path() {
None => {
let file = EMBEDDED_WEBSITE
.get_file("index.html")
.expect("index.html must exist in embedded website");
let cached = INDEX_HTML.get_or_init(|| {
let html = match self.filesystem_path() {
None => {
let file = EMBEDDED_WEBSITE
.get_file("index.html")
.expect("index.html must exist in embedded website");
let html =
std::str::from_utf8(file.contents()).expect("index.html must be valid UTF-8");
let html =
std::str::from_utf8(file.contents()).expect("index.html must be valid UTF-8");
let importmap = ImportMap::scan_embedded(&EMBEDDED_WEBSITE, "");
importmap
.transform_html(html)
.unwrap_or_else(|| html.to_string())
}
Some(base) => {
let html =
fs::read_to_string(base.join("index.html")).expect("index.html must exist");
let importmap = ImportMap::scan_embedded(&EMBEDDED_WEBSITE, "");
importmap
.transform_html(html)
.unwrap_or_else(|| html.to_string())
}
Some(base) => {
let html =
fs::read_to_string(base.join("index.html")).expect("index.html must exist");
match ImportMap::scan(&base, "") {
Ok(importmap) => importmap.transform_html(&html).unwrap_or(html),
Err(e) => {
error!("Failed to scan for importmap: {e}");
html
match ImportMap::scan(&base, "") {
Ok(importmap) => importmap.transform_html(&html).unwrap_or(html),
Err(e) => {
error!("Failed to scan for importmap: {e}");
html
}
}
}
};
let mut hasher = DefaultHasher::new();
html.hash(&mut hasher);
let etag = format!("\"{}\"", hasher.finish());
CachedIndex {
html: html.into_bytes(),
etag,
}
});
Ok(html.as_bytes().to_vec())
Ok(cached.html.clone())
}
fn get_embedded(&self, path: &str) -> Result<Vec<u8>> {
+118
View File
@@ -4,6 +4,124 @@ All notable changes to the Bitcoin Research Kit (BRK) project will be documented
> *This changelog was generated by Claude Code*
## [v0.1.4](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.1.4) - 2026-02-04
### Breaking Changes
#### `brk_computer`
- Changed VOCDD (Value of Coin Days Destroyed) calculation to be supply-adjusted: `price × (CDD / circulating_supply)` instead of `price × CDD`, accounting for growing supply over time ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/cointime/value/compute.rs))
- Changed Reserve Risk calculation to use 365-day rolling median instead of 365-day SMA for VOCDD smoothing, providing more robust values resistant to outliers ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/cointime/reserve_risk/vecs.rs))
- Changed `net_sentiment` computation for aggregate cohorts to use capital-weighted average of component cohorts instead of simple greed - pain formula, producing values that properly represent the weighted contribution of each cohort ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/distribution/metrics/mod.rs))
- Changed drawdown computation formula from `(ath - current) / ath * -100` to `(current - ath) / ath * 100`, where positive values now indicate performance above ATH and negative values indicate drawdown below ATH ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/traits/mod.rs))
### New Features
#### `brk_computer`
- Added `hash_rate_ath` metric tracking the all-time high hash rate at each block ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/blocks/mining/vecs.rs))
- Added `hash_rate_drawdown` metric showing percentage drawdown from hash rate all-time high ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/blocks/mining/compute.rs))
- Added `_30d_change` metric for all address type counts (p2pkh, p2sh, p2wpkh, p2wsh, p2tr, p2pk33, p2pk65, p2a), tracking 30-day percentage change in address counts ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/distribution/address/address_count.rs))
- Added `utxo_count_30d_change` metric to OutputsMetrics tracking 30-day percentage change in UTXO count per cohort ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/distribution/metrics/outputs.rs))
#### `brk_types`
- Added `From<StoredU64>` conversion for `StoredF64` enabling direct u64 to f64 stored value conversion ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_types/src/stored_f64.rs))
### Internal Changes
#### `brk_computer`
- Generalized `ComputeDrawdown` trait to work with any value types convertible to f64, not just `Close<Dollars>` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/traits/mod.rs))
- Removed `NegRatio32` transform (no longer needed after drawdown formula change) ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/internal/single/transform/mod.rs))
- Separated net_sentiment computation into `compute_net_sentiment_height` for separate cohorts and `compute_net_sentiment_from_others` for aggregate cohorts ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/distribution/metrics/unrealized.rs))
- Added `AddrCountVecs` struct grouping address count with its 30d_change metric ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/distribution/address/address_count.rs))
- Refactored aggregate UTXO cohort computation with `for_each_aggregate` helper method for cleaner code organization
- Added unit tests for HODL Bank and Reserve Risk formula verification ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_computer/src/cointime/reserve_risk/compute.rs))
#### `brk_indexer`
- Removed debug logging from transaction metadata storage for cleaner logs ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.4/crates/brk_indexer/src/processor/tx.rs))
#### `website`
- Reorganized chart options into new module structure with dedicated files for activity, profitability, cost-basis, holdings, prices, and valuation
- Consolidated color utilities into `website/scripts/utils/colors.js` module
#### `clients`
- Bumped JavaScript and Python client versions
[View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.1.3...v0.1.4)
## [v0.1.3](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.1.3) - 2026-02-03
### Breaking Changes
#### `brk_types`
- Renamed `LoadedAddressIndex` to `FundedAddressIndex` throughout the codebase ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_types/src/fundedaddressindex.rs))
- Renamed `LoadedAddressData` to `FundedAddressData` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_types/src/fundedaddressdata.rs))
- Renamed `OHLCCents` to `OHLCCentsUnsigned` for consistency with unsigned cents types ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_types/src/ohlc.rs))
- Removed `Cents`, `CentsCompact`, and `CentsSignedCompact` types (consolidated into unsigned variants)
### New Features
#### `brk_types`
- Added `SatsSigned` type (i64-based) for signed satoshi values used in changes, deltas, and profit/loss calculations ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_types/src/sats_signed.rs))
- Added `CentsSats` type (u128-based) for price × sats calculations with widening multiplication to prevent overflow ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_types/src/cents_sats.rs))
- Added `CentsSquaredSats` type (u128-based) for price² × sats calculations used in investor cap metrics ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_types/src/cents_squared_sats.rs))
#### `brk_computer`
- Added `investor_price` metric - dollar-weighted average acquisition price with both USD and sats representations ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/distribution/metrics/realized.rs))
- Added `cap_raw` metric storing raw Σ(price × sats) for precise realized cap aggregation across cohorts
- Added `investor_cap_raw` metric storing raw Σ(price² × sats) for precise investor_price aggregation
- Added `realized_profit_7d_ema`, `realized_loss_7d_ema`, and `net_realized_pnl_7d_ema` metrics for smoothed realized PnL analysis
- Added `profit_value_created` and `profit_value_destroyed` metrics splitting value flows by profit transactions
- Added `loss_value_created` and `loss_value_destroyed` metrics splitting value flows by loss transactions
- Added `capitulation_flow` as a lazy alias for loss_value_destroyed (coins sold at a loss)
- Added `profit_flow` as a lazy alias for profit_value_created (coins sold at a profit)
- Added `peak_regret` metric: Σ((peak - sell_price) × sats) measuring how much more could have been made by selling at peak ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/distribution/metrics/realized.rs))
- Added `peak_regret_rel_to_realized_cap` expressing peak regret as percentage of realized cap
- Added `invested_capital_in_profit` and `invested_capital_in_loss` metrics tracking cost basis of UTXOs by profit/loss status ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/distribution/metrics/unrealized.rs))
- Added raw aggregation values for unrealized metrics: `invested_capital_in_profit_raw`, `invested_capital_in_loss_raw`, `investor_cap_in_profit_raw`, `investor_cap_in_loss_raw`
- Added `pain_index` metric: investor_price_of_losers - spot, measuring average distance underwater weighted by USD invested
- Added `greed_index` metric: spot - investor_price_of_winners, measuring average distance in profit weighted by USD invested
- Added `net_sentiment` metric: greed_index - pain_index, positive values indicate greedy market, negative indicate painful market
- Added `unrealized_peak_regret` metric for age-range UTXO cohorts
- Added `invested_capital` percentiles providing USD-weighted cost basis distribution (complementing sat-weighted percentiles) ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/distribution/metrics/cost_basis.rs))
- Added `spot_cost_basis_percentile` metric showing what percentile of cost basis is below current spot price (sat-weighted)
- Added `spot_invested_capital_percentile` metric showing what percentile of invested capital is below current spot price (USD-weighted)
- Added `ValueChangeFromDate` module for computing N-day value changes stored as signed sats ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/internal/multi/from_date/value_change.rs))
- Added `LazyValueChangeDateDerived` module for lazy computation of bitcoin and dollar values from signed sats changes ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/internal/multi/from_date/value_change_derived.rs))
- Added `LazyPriceFromCents` module providing lazy price wrapper with both USD and sats representations from a cents base ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/internal/multi/from_height/lazy_price_from_cents.rs))
- Added `CentsUnsignedToDollars` transform for converting cents to dollars ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/internal/single/transform/cents_unsigned_to_dollars.rs))
- Added `CentsUnsignedToSatsFract` transform for converting cents to sats exchange rate ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/internal/single/transform/cents_unsigned_to_sats_fract.rs))
#### `brk_cohort`
- Added `compute_relative()` method to `Filter` that returns false for edge-case output types (Empty, P2MS, Unknown) which have insufficient volume for meaningful ratio analysis ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_cohort/src/filter.rs))
### Internal Changes
#### `brk_computer`
- Replaced `PriceToAmount` struct with `CostBasisData` providing more efficient storage with raw cap and investor_cap values for precise aggregation ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/distribution/state/cost_basis/cost_basis_data.rs))
- Added `Percentiles` struct that computes both sat-weighted and USD-weighted percentiles in a single pass ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_computer/src/distribution/state/cost_basis/percentiles.rs))
- Changed `UnrealizedState` to use `CentsUnsigned` instead of `Dollars` for unrealized profit/loss values
- Changed `realized_cap` to derive from `realized_cap_cents` via lazy transform for consistent precision
- Aggregate percentile computation now supports both sat-weighted and USD-weighted metrics with spot price parameter
- Removed `ClosePriceTimesRatio` transform (functionality consolidated into other transforms)
#### `brk_bindgen`
- Added pattern deduplication by name to prevent duplicate patterns when different signatures normalize to the same name ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_bindgen/src/analysis/patterns.rs))
- Changed to BTreeMap/BTreeSet for deterministic pattern generation order
- Changed pattern naming to generate stable names from first word of each field (deduped, sorted)
#### `brk_fetcher`
- Changed return types from `OHLCCents` to `OHLCCentsUnsigned` for consistency ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_fetcher/src/lib.rs))
#### `brk_traversable`
- Changed `TreeNode::Branch` internal storage from `BTreeMap` to `IndexMap` to preserve insertion order in API tree responses ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.1.3/crates/brk_traversable/src/lib.rs))
#### `website`
- Removed `website/scripts/options/market/` subdirectory structure (averages.js, bands.js, index.js, investing.js, momentum.js, onchain.js, performance.js, volatility.js)
- Consolidated market options into top-level `market.js` and `investing.js` files
- Added new `mining.js` and `network.js` option modules
- Removed `chain.js` module
[View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.1.2...v0.1.3)
## [v0.1.2](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.1.2) - 2026-01-29
### New Features
+163 -65
View File
@@ -6,7 +6,7 @@
# Class: BrkClient
Defined in: [Developer/brk/modules/brk-client/index.js:4877](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L4877)
Defined in: [Developer/brk/modules/brk-client/index.js:4994](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L4994)
Main BRK client with metrics tree and API methods
@@ -20,7 +20,7 @@ Main BRK client with metrics tree and API methods
> **new BrkClient**(`options`): `BrkClient`
Defined in: [Developer/brk/modules/brk-client/index.js:5794](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L5794)
Defined in: [Developer/brk/modules/brk-client/index.js:5911](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L5911)
#### Parameters
@@ -38,11 +38,23 @@ Defined in: [Developer/brk/modules/brk-client/index.js:5794](https://github.com/
## Properties
### \_cache
> **\_cache**: `Cache` \| `null`
Defined in: [Developer/brk/modules/brk-client/index.js:1167](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1167)
#### Inherited from
`BrkClientBase._cache`
***
### \_cachePromise
> **\_cachePromise**: `Promise`\<`Cache` \| `null`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1127](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1127)
Defined in: [Developer/brk/modules/brk-client/index.js:1165](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1165)
#### Inherited from
@@ -54,7 +66,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1127](https://github.com/
> **metrics**: [`MetricsTree`](../interfaces/MetricsTree.md)
Defined in: [Developer/brk/modules/brk-client/index.js:5797](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L5797)
Defined in: [Developer/brk/modules/brk-client/index.js:5914](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L5914)
## Methods
@@ -62,7 +74,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:5797](https://github.com/
> **\_fetchMetricData**\<`T`\>(`path`, `onUpdate?`): `Promise`\<[`MetricData`](../interfaces/MetricData.md)\<`T`\>\>
Defined in: [Developer/brk/modules/brk-client/index.js:1194](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1194)
Defined in: [Developer/brk/modules/brk-client/index.js:1257](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1257)
Fetch metric data and wrap with helper methods (internal)
@@ -96,7 +108,7 @@ Fetch metric data and wrap with helper methods (internal)
> **get**(`path`): `Promise`\<`Response`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1134](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1134)
Defined in: [Developer/brk/modules/brk-client/index.js:1175](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1175)
#### Parameters
@@ -118,7 +130,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1134](https://github.com/
> **getAddress**(`address`): `Promise`\<[`AddressStats`](../interfaces/AddressStats.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:6973](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L6973)
Defined in: [Developer/brk/modules/brk-client/index.js:7102](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7102)
Address information
@@ -144,7 +156,7 @@ Endpoint: `GET /api/address/{address}`
> **getAddressConfirmedTxs**(`address`, `after_txid?`, `limit?`): `Promise`\<`string`[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7014](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7014)
Defined in: [Developer/brk/modules/brk-client/index.js:7143](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7143)
Address confirmed transactions
@@ -182,7 +194,7 @@ Maximum number of results to return. Defaults to 25 if not specified.
> **getAddressMempoolTxs**(`address`): `Promise`\<`string`[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7035](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7035)
Defined in: [Developer/brk/modules/brk-client/index.js:7164](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7164)
Address mempool transactions
@@ -208,7 +220,7 @@ Endpoint: `GET /api/address/{address}/txs/mempool`
> **getAddressTxs**(`address`, `after_txid?`, `limit?`): `Promise`\<`string`[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:6991](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L6991)
Defined in: [Developer/brk/modules/brk-client/index.js:7120](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7120)
Address transaction IDs
@@ -246,7 +258,7 @@ Maximum number of results to return. Defaults to 25 if not specified.
> **getAddressUtxos**(`address`): `Promise`\<[`Utxo`](../interfaces/Utxo.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7051](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7051)
Defined in: [Developer/brk/modules/brk-client/index.js:7180](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7180)
Address UTXOs
@@ -272,7 +284,7 @@ Endpoint: `GET /api/address/{address}/utxo`
> **getApi**(): `Promise`\<`any`\>
Defined in: [Developer/brk/modules/brk-client/index.js:6957](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L6957)
Defined in: [Developer/brk/modules/brk-client/index.js:7086](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7086)
Compact OpenAPI specification
@@ -290,7 +302,7 @@ Endpoint: `GET /api.json`
> **getBlock**(`hash`): `Promise`\<[`BlockInfo`](../interfaces/BlockInfo.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7083](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7083)
Defined in: [Developer/brk/modules/brk-client/index.js:7212](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7212)
Block information
@@ -316,7 +328,7 @@ Endpoint: `GET /api/block/{hash}`
> **getBlockByHeight**(`height`): `Promise`\<[`BlockInfo`](../interfaces/BlockInfo.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7067](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7067)
Defined in: [Developer/brk/modules/brk-client/index.js:7196](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7196)
Block by height
@@ -342,7 +354,7 @@ Endpoint: `GET /api/block-height/{height}`
> **getBlockByTimestamp**(`timestamp`): `Promise`\<[`BlockTimestamp`](../interfaces/BlockTimestamp.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7597](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7597)
Defined in: [Developer/brk/modules/brk-client/index.js:7778](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7778)
Block by timestamp
@@ -368,7 +380,7 @@ Endpoint: `GET /api/v1/mining/blocks/timestamp/{timestamp}`
> **getBlockFeeRates**(`time_period`): `Promise`\<`any`\>
Defined in: [Developer/brk/modules/brk-client/index.js:7533](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7533)
Defined in: [Developer/brk/modules/brk-client/index.js:7714](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7714)
Block fee rates (WIP)
@@ -394,7 +406,7 @@ Endpoint: `GET /api/v1/mining/blocks/fee-rates/{time_period}`
> **getBlockFees**(`time_period`): `Promise`\<[`BlockFeesEntry`](../interfaces/BlockFeesEntry.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7549](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7549)
Defined in: [Developer/brk/modules/brk-client/index.js:7730](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7730)
Block fees
@@ -420,7 +432,7 @@ Endpoint: `GET /api/v1/mining/blocks/fees/{time_period}`
> **getBlockRaw**(`hash`): `Promise`\<`number`[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7099](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7099)
Defined in: [Developer/brk/modules/brk-client/index.js:7228](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7228)
Raw block
@@ -446,7 +458,7 @@ Endpoint: `GET /api/block/{hash}/raw`
> **getBlockRewards**(`time_period`): `Promise`\<[`BlockRewardsEntry`](../interfaces/BlockRewardsEntry.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7565](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7565)
Defined in: [Developer/brk/modules/brk-client/index.js:7746](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7746)
Block rewards
@@ -472,7 +484,7 @@ Endpoint: `GET /api/v1/mining/blocks/rewards/{time_period}`
> **getBlocks**(): `Promise`\<[`BlockInfo`](../interfaces/BlockInfo.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7179](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7179)
Defined in: [Developer/brk/modules/brk-client/index.js:7308](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7308)
Recent blocks
@@ -492,7 +504,7 @@ Endpoint: `GET /api/blocks`
> **getBlocksFromHeight**(`height`): `Promise`\<[`BlockInfo`](../interfaces/BlockInfo.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7195](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7195)
Defined in: [Developer/brk/modules/brk-client/index.js:7324](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7324)
Blocks from height
@@ -518,7 +530,7 @@ Endpoint: `GET /api/blocks/{height}`
> **getBlockSizesWeights**(`time_period`): `Promise`\<[`BlockSizesWeights`](../interfaces/BlockSizesWeights.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7581](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7581)
Defined in: [Developer/brk/modules/brk-client/index.js:7762](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7762)
Block sizes and weights
@@ -544,7 +556,7 @@ Endpoint: `GET /api/v1/mining/blocks/sizes-weights/{time_period}`
> **getBlockStatus**(`hash`): `Promise`\<[`BlockStatus`](../interfaces/BlockStatus.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7115](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7115)
Defined in: [Developer/brk/modules/brk-client/index.js:7244](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7244)
Block status
@@ -570,7 +582,7 @@ Endpoint: `GET /api/block/{hash}/status`
> **getBlockTxid**(`hash`, `index`): `Promise`\<`string`\>
Defined in: [Developer/brk/modules/brk-client/index.js:7132](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7132)
Defined in: [Developer/brk/modules/brk-client/index.js:7261](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7261)
Transaction ID at index
@@ -604,7 +616,7 @@ Transaction index within the block (0-based)
> **getBlockTxids**(`hash`): `Promise`\<`string`[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7148](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7148)
Defined in: [Developer/brk/modules/brk-client/index.js:7277](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7277)
Block transaction IDs
@@ -630,7 +642,7 @@ Endpoint: `GET /api/block/{hash}/txids`
> **getBlockTxs**(`hash`, `start_index`): `Promise`\<[`Transaction`](../interfaces/Transaction.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7165](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7165)
Defined in: [Developer/brk/modules/brk-client/index.js:7294](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7294)
Block transactions (paginated)
@@ -660,11 +672,97 @@ Starting transaction index within the block (0-based)
***
### getCostBasis()
> **getCostBasis**(`cohort`, `date`, `bucket?`, `value?`): `Promise`\<`Object`\>
Defined in: [Developer/brk/modules/brk-client/index.js:7485](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7485)
Cost basis distribution
Get the cost basis distribution for a cohort on a specific date.
Query params:
- `bucket`: raw (default), lin200, lin500, lin1000, log10, log50, log100
- `value`: supply (default, in BTC), realized (USD), unrealized (USD)
Endpoint: `GET /api/metrics/cost-basis/{cohort}/{date}`
#### Parameters
##### cohort
`string`
##### date
`string`
##### bucket?
[`CostBasisBucket`](../type-aliases/CostBasisBucket.md)
Bucket type for aggregation. Default: raw (no aggregation).
##### value?
[`CostBasisValue`](../type-aliases/CostBasisValue.md)
Value type to return. Default: supply.
#### Returns
`Promise`\<`Object`\>
***
### getCostBasisCohorts()
> **getCostBasisCohorts**(): `Promise`\<`string`[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7450](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7450)
Available cost basis cohorts
List available cohorts for cost basis distribution.
Endpoint: `GET /api/metrics/cost-basis`
#### Returns
`Promise`\<`string`[]\>
***
### getCostBasisDates()
> **getCostBasisDates**(`cohort`): `Promise`\<`number`[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7464](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7464)
Available cost basis dates
List available dates for a cohort's cost basis distribution.
Endpoint: `GET /api/metrics/cost-basis/{cohort}/dates`
#### Parameters
##### cohort
`string`
#### Returns
`Promise`\<`number`[]\>
***
### getDifficultyAdjustment()
> **getDifficultyAdjustment**(): `Promise`\<[`DifficultyAdjustment`](../interfaces/DifficultyAdjustment.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7489](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7489)
Defined in: [Developer/brk/modules/brk-client/index.js:7670](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7670)
Difficulty adjustment
@@ -684,7 +782,7 @@ Endpoint: `GET /api/v1/difficulty-adjustment`
> **getDifficultyAdjustments**(): `Promise`\<[`DifficultyAdjustmentEntry`](../interfaces/DifficultyAdjustmentEntry.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7611](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7611)
Defined in: [Developer/brk/modules/brk-client/index.js:7792](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7792)
Difficulty adjustments (all time)
@@ -704,7 +802,7 @@ Endpoint: `GET /api/v1/mining/difficulty-adjustments`
> **getDifficultyAdjustmentsByPeriod**(`time_period`): `Promise`\<[`DifficultyAdjustmentEntry`](../interfaces/DifficultyAdjustmentEntry.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7627](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7627)
Defined in: [Developer/brk/modules/brk-client/index.js:7808](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7808)
Difficulty adjustments
@@ -730,7 +828,7 @@ Endpoint: `GET /api/v1/mining/difficulty-adjustments/{time_period}`
> **getDiskUsage**(): `Promise`\<[`DiskUsage`](../interfaces/DiskUsage.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7382](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7382)
Defined in: [Developer/brk/modules/brk-client/index.js:7563](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7563)
Disk usage
@@ -748,7 +846,7 @@ Endpoint: `GET /api/server/disk`
> **getHashrate**(): `Promise`\<[`HashrateSummary`](../interfaces/HashrateSummary.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7641](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7641)
Defined in: [Developer/brk/modules/brk-client/index.js:7822](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7822)
Network hashrate (all time)
@@ -768,7 +866,7 @@ Endpoint: `GET /api/v1/mining/hashrate`
> **getHashrateByPeriod**(`time_period`): `Promise`\<[`HashrateSummary`](../interfaces/HashrateSummary.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7657](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7657)
Defined in: [Developer/brk/modules/brk-client/index.js:7838](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7838)
Network hashrate
@@ -794,7 +892,7 @@ Endpoint: `GET /api/v1/mining/hashrate/{time_period}`
> **getHealth**(): `Promise`\<[`Health`](../interfaces/Health.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7747](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7747)
Defined in: [Developer/brk/modules/brk-client/index.js:7928](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7928)
Health check
@@ -812,7 +910,7 @@ Endpoint: `GET /health`
> **getIndexes**(): `Promise`\<[`IndexInfo`](../interfaces/IndexInfo.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7333](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7333)
Defined in: [Developer/brk/modules/brk-client/index.js:7514](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7514)
List available indexes
@@ -830,9 +928,9 @@ Endpoint: `GET /api/metrics/indexes`
> **getJson**\<`T`\>(`path`, `onUpdate?`): `Promise`\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1149](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1149)
Defined in: [Developer/brk/modules/brk-client/index.js:1190](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1190)
Make a GET request with stale-while-revalidate caching
Make a GET request - races cache vs network, first to resolve calls onUpdate
#### Type Parameters
@@ -850,7 +948,7 @@ Make a GET request with stale-while-revalidate caching
(`value`) => `void`
Called when data is available
Called when data is available (may be called twice: cache then network)
#### Returns
@@ -866,7 +964,7 @@ Called when data is available
> **getMempool**(): `Promise`\<[`MempoolInfo`](../interfaces/MempoolInfo.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7209](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7209)
Defined in: [Developer/brk/modules/brk-client/index.js:7338](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7338)
Mempool statistics
@@ -886,7 +984,7 @@ Endpoint: `GET /api/mempool/info`
> **getMempoolBlocks**(): `Promise`\<[`MempoolBlock`](../interfaces/MempoolBlock.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7503](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7503)
Defined in: [Developer/brk/modules/brk-client/index.js:7684](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7684)
Projected mempool blocks
@@ -906,7 +1004,7 @@ Endpoint: `GET /api/v1/fees/mempool-blocks`
> **getMempoolTxids**(): `Promise`\<`string`[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7223](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7223)
Defined in: [Developer/brk/modules/brk-client/index.js:7352](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7352)
Mempool transaction IDs
@@ -926,7 +1024,7 @@ Endpoint: `GET /api/mempool/txids`
> **getMetric**(`metric`, `index`, `start?`, `end?`, `limit?`, `format?`): `Promise`\<`string` \| [`AnyMetricData`](../type-aliases/AnyMetricData.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7256](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7256)
Defined in: [Developer/brk/modules/brk-client/index.js:7385](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7385)
Get metric data
@@ -982,7 +1080,7 @@ Format of the output
> **getMetricInfo**(`metric`): `Promise`\<[`Index`](../type-aliases/Index.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7237](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7237)
Defined in: [Developer/brk/modules/brk-client/index.js:7366](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7366)
Get supported indexes for a metric
@@ -1006,7 +1104,7 @@ Endpoint: `GET /api/metric/{metric}`
> **getMetrics**(`metrics?`, `index?`, `start?`, `end?`, `limit?`, `format?`): `Promise`\<`string` \| [`AnyMetricData`](../type-aliases/AnyMetricData.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7297](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7297)
Defined in: [Developer/brk/modules/brk-client/index.js:7426](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7426)
Bulk metric data
@@ -1062,7 +1160,7 @@ Format of the output
> **getMetricsCount**(): `Promise`\<[`MetricCount`](../interfaces/MetricCount.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7321](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7321)
Defined in: [Developer/brk/modules/brk-client/index.js:7502](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7502)
Metric count
@@ -1080,7 +1178,7 @@ Endpoint: `GET /api/metrics/count`
> **getMetricsTree**(): `Promise`\<[`TreeNode`](../type-aliases/TreeNode.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7278](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7278)
Defined in: [Developer/brk/modules/brk-client/index.js:7407](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7407)
Metrics catalog
@@ -1098,7 +1196,7 @@ Endpoint: `GET /api/metrics`
> **getOpenapi**(): `Promise`\<`any`\>
Defined in: [Developer/brk/modules/brk-client/index.js:7759](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7759)
Defined in: [Developer/brk/modules/brk-client/index.js:7940](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7940)
OpenAPI specification
@@ -1116,7 +1214,7 @@ Endpoint: `GET /openapi.json`
> **getPool**(`slug`): `Promise`\<[`PoolDetail`](../interfaces/PoolDetail.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7673](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7673)
Defined in: [Developer/brk/modules/brk-client/index.js:7854](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7854)
Mining pool details
@@ -1142,7 +1240,7 @@ Endpoint: `GET /api/v1/mining/pool/{slug}`
> **getPools**(): `Promise`\<[`PoolInfo`](../interfaces/PoolInfo.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7687](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7687)
Defined in: [Developer/brk/modules/brk-client/index.js:7868](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7868)
List all mining pools
@@ -1162,7 +1260,7 @@ Endpoint: `GET /api/v1/mining/pools`
> **getPoolStats**(`time_period`): `Promise`\<[`PoolsSummary`](../interfaces/PoolsSummary.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7703](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7703)
Defined in: [Developer/brk/modules/brk-client/index.js:7884](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7884)
Mining pool statistics
@@ -1188,7 +1286,7 @@ Endpoint: `GET /api/v1/mining/pools/{time_period}`
> **getRecommendedFees**(): `Promise`\<[`RecommendedFees`](../interfaces/RecommendedFees.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7517](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7517)
Defined in: [Developer/brk/modules/brk-client/index.js:7698](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7698)
Recommended fees
@@ -1208,7 +1306,7 @@ Endpoint: `GET /api/v1/fees/recommended`
> **getRewardStats**(`block_count`): `Promise`\<[`RewardStats`](../interfaces/RewardStats.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7719](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7719)
Defined in: [Developer/brk/modules/brk-client/index.js:7900](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7900)
Mining reward statistics
@@ -1236,7 +1334,7 @@ Number of recent blocks to include
> **getSyncStatus**(): `Promise`\<[`SyncStatus`](../interfaces/SyncStatus.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7394](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7394)
Defined in: [Developer/brk/modules/brk-client/index.js:7575](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7575)
Sync status
@@ -1254,7 +1352,7 @@ Endpoint: `GET /api/server/sync`
> **getText**(`path`): `Promise`\<`string`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1182](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1182)
Defined in: [Developer/brk/modules/brk-client/index.js:1245](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1245)
Make a GET request and return raw text (for CSV responses)
@@ -1278,7 +1376,7 @@ Make a GET request and return raw text (for CSV responses)
> **getTx**(`txid`): `Promise`\<[`Transaction`](../interfaces/Transaction.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7410](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7410)
Defined in: [Developer/brk/modules/brk-client/index.js:7591](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7591)
Transaction information
@@ -1304,7 +1402,7 @@ Endpoint: `GET /api/tx/{txid}`
> **getTxHex**(`txid`): `Promise`\<`string`\>
Defined in: [Developer/brk/modules/brk-client/index.js:7426](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7426)
Defined in: [Developer/brk/modules/brk-client/index.js:7607](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7607)
Transaction hex
@@ -1330,7 +1428,7 @@ Endpoint: `GET /api/tx/{txid}/hex`
> **getTxOutspend**(`txid`, `vout`): `Promise`\<[`TxOutspend`](../interfaces/TxOutspend.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7443](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7443)
Defined in: [Developer/brk/modules/brk-client/index.js:7624](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7624)
Output spend status
@@ -1364,7 +1462,7 @@ Output index
> **getTxOutspends**(`txid`): `Promise`\<[`TxOutspend`](../interfaces/TxOutspend.md)[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7459](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7459)
Defined in: [Developer/brk/modules/brk-client/index.js:7640](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7640)
All output spend statuses
@@ -1390,7 +1488,7 @@ Endpoint: `GET /api/tx/{txid}/outspends`
> **getTxStatus**(`txid`): `Promise`\<[`TxStatus`](../interfaces/TxStatus.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7475](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7475)
Defined in: [Developer/brk/modules/brk-client/index.js:7656](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7656)
Transaction status
@@ -1416,7 +1514,7 @@ Endpoint: `GET /api/tx/{txid}/status`
> **getVersion**(): `Promise`\<`string`\>
Defined in: [Developer/brk/modules/brk-client/index.js:7771](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7771)
Defined in: [Developer/brk/modules/brk-client/index.js:7952](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7952)
API version
@@ -1434,7 +1532,7 @@ Endpoint: `GET /version`
> **indexToDate**(`index`, `i`): `Date`
Defined in: [Developer/brk/modules/brk-client/index.js:5778](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L5778)
Defined in: [Developer/brk/modules/brk-client/index.js:5895](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L5895)
Convert an index value to a Date for date-based indexes.
@@ -1462,7 +1560,7 @@ The index value
> **isDateIndex**(`index`): `boolean`
Defined in: [Developer/brk/modules/brk-client/index.js:5787](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L5787)
Defined in: [Developer/brk/modules/brk-client/index.js:5904](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L5904)
Check if an index type is date-based.
@@ -1482,7 +1580,7 @@ Check if an index type is date-based.
> **listMetrics**(`page?`): `Promise`\<[`PaginatedMetrics`](../interfaces/PaginatedMetrics.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7347](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7347)
Defined in: [Developer/brk/modules/brk-client/index.js:7528](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7528)
Metrics list
@@ -1508,7 +1606,7 @@ Pagination index
> **metric**(`metric`, `index`): [`MetricEndpointBuilder`](../interfaces/MetricEndpointBuilder.md)\<`unknown`\>
Defined in: [Developer/brk/modules/brk-client/index.js:6945](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L6945)
Defined in: [Developer/brk/modules/brk-client/index.js:7074](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7074)
Create a dynamic metric endpoint builder for any metric/index combination.
@@ -1539,7 +1637,7 @@ The index name
> **searchMetrics**(`metric`, `limit?`): `Promise`\<`string`[]\>
Defined in: [Developer/brk/modules/brk-client/index.js:7366](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7366)
Defined in: [Developer/brk/modules/brk-client/index.js:7547](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7547)
Search metrics
@@ -1567,7 +1665,7 @@ Endpoint: `GET /api/metrics/search/{metric}`
> **validateAddress**(`address`): `Promise`\<[`AddressValidation`](../interfaces/AddressValidation.md)\>
Defined in: [Developer/brk/modules/brk-client/index.js:7735](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L7735)
Defined in: [Developer/brk/modules/brk-client/index.js:7916](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L7916)
Validate address
+2 -2
View File
@@ -6,7 +6,7 @@
# Class: BrkError
Defined in: [Developer/brk/modules/brk-client/index.js:854](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L854)
Defined in: [Developer/brk/modules/brk-client/index.js:892](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L892)
Custom error class for BRK client errors
@@ -20,7 +20,7 @@ Custom error class for BRK client errors
> **new BrkError**(`message`, `status?`): `BrkError`
Defined in: [Developer/brk/modules/brk-client/index.js:859](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L859)
Defined in: [Developer/brk/modules/brk-client/index.js:897](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L897)
#### Parameters
+12 -4
View File
@@ -17,6 +17,7 @@
- [\_10y2y3y4y5y6y8yPattern](interfaces/10y2y3y4y5y6y8yPattern.md)
- [\_1m1w1y24hBlocksCoinbaseDaysDominanceFeeSubsidyPattern](interfaces/1m1w1y24hBlocksCoinbaseDaysDominanceFeeSubsidyPattern.md)
- [\_201520162017201820192020202120222023202420252026Pattern2](interfaces/201520162017201820192020202120222023202420252026Pattern2.md)
- [\_30dCountPattern](interfaces/30dCountPattern.md)
- [\_30dHalvedTotalPattern](interfaces/30dHalvedTotalPattern.md)
- [ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern](interfaces/ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern.md)
- [ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern](interfaces/ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern.md)
@@ -31,8 +32,8 @@
- [AddressStats](interfaces/AddressStats.md)
- [AddressTxidsParam](interfaces/AddressTxidsParam.md)
- [AddressValidation](interfaces/AddressValidation.md)
- [AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern](interfaces/AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern.md)
- [AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2](interfaces/AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2.md)
- [AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern](interfaces/AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern.md)
- [AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2](interfaces/AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2.md)
- [AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern](interfaces/AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern.md)
- [AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern](interfaces/AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern.md)
- [AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2](interfaces/AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2.md)
@@ -59,10 +60,13 @@
- [BlockTimestamp](interfaces/BlockTimestamp.md)
- [BlockWeightEntry](interfaces/BlockWeightEntry.md)
- [BrkClientOptions](interfaces/BrkClientOptions.md)
- [CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern](interfaces/CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern.md)
- [CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2](interfaces/CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2.md)
- [CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern](interfaces/CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern.md)
- [CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2](interfaces/CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2.md)
- [CloseHighLowOpenPattern2](interfaces/CloseHighLowOpenPattern2.md)
- [CoinblocksCoindaysSatblocksSatdaysSentPattern](interfaces/CoinblocksCoindaysSatblocksSatdaysSentPattern.md)
- [CostBasisCohortParam](interfaces/CostBasisCohortParam.md)
- [CostBasisParams](interfaces/CostBasisParams.md)
- [CostBasisQuery](interfaces/CostBasisQuery.md)
- [CumulativeSumPattern](interfaces/CumulativeSumPattern.md)
- [CumulativeSumPattern2](interfaces/CumulativeSumPattern2.md)
- [DataRangeFormat](interfaces/DataRangeFormat.md)
@@ -129,6 +133,7 @@
- [MetricsTree\_Distribution\_AnyAddressIndexes](interfaces/MetricsTree_Distribution_AnyAddressIndexes.md)
- [MetricsTree\_Distribution\_GrowthRate](interfaces/MetricsTree_Distribution_GrowthRate.md)
- [MetricsTree\_Distribution\_NewAddrCount](interfaces/MetricsTree_Distribution_NewAddrCount.md)
- [MetricsTree\_Distribution\_TotalAddrCount](interfaces/MetricsTree_Distribution_TotalAddrCount.md)
- [MetricsTree\_Distribution\_UtxoCohorts](interfaces/MetricsTree_Distribution_UtxoCohorts.md)
- [MetricsTree\_Distribution\_UtxoCohorts\_AgeRange](interfaces/MetricsTree_Distribution_UtxoCohorts_AgeRange.md)
- [MetricsTree\_Distribution\_UtxoCohorts\_All](interfaces/MetricsTree_Distribution_UtxoCohorts_All.md)
@@ -268,6 +273,9 @@
- [CentsSquaredSats](type-aliases/CentsSquaredSats.md)
- [CentsUnsigned](type-aliases/CentsUnsigned.md)
- [Close](type-aliases/Close.md)
- [Cohort](type-aliases/Cohort.md)
- [CostBasisBucket](type-aliases/CostBasisBucket.md)
- [CostBasisValue](type-aliases/CostBasisValue.md)
- [Date](type-aliases/Date.md)
- [DateIndex](type-aliases/DateIndex.md)
- [DecadeIndex](type-aliases/DecadeIndex.md)
@@ -6,7 +6,7 @@
# Interface: \_0sdM0M1M1sdM2M2sdM3sdP0P1P1sdP2P2sdP3sdSdSmaZscorePattern
Defined in: [Developer/brk/modules/brk-client/index.js:1834](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1834)
Defined in: [Developer/brk/modules/brk-client/index.js:1913](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1913)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1834](https://github.com/
> **\_0sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1835](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1835)
Defined in: [Developer/brk/modules/brk-client/index.js:1914](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1914)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1835](https://github.com/
> **m05sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1836](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1836)
Defined in: [Developer/brk/modules/brk-client/index.js:1915](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1915)
***
@@ -30,7 +30,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1836](https://github.com/
> **m05sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1837](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1837)
Defined in: [Developer/brk/modules/brk-client/index.js:1916](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1916)
***
@@ -38,7 +38,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1837](https://github.com/
> **m15sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1838](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1838)
Defined in: [Developer/brk/modules/brk-client/index.js:1917](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1917)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1838](https://github.com/
> **m15sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1839](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1839)
Defined in: [Developer/brk/modules/brk-client/index.js:1918](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1918)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1839](https://github.com/
> **m1sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1840](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1840)
Defined in: [Developer/brk/modules/brk-client/index.js:1919](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1919)
***
@@ -62,7 +62,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1840](https://github.com/
> **m1sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1841](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1841)
Defined in: [Developer/brk/modules/brk-client/index.js:1920](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1920)
***
@@ -70,7 +70,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1841](https://github.com/
> **m25sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1842](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1842)
Defined in: [Developer/brk/modules/brk-client/index.js:1921](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1921)
***
@@ -78,7 +78,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1842](https://github.com/
> **m25sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1843](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1843)
Defined in: [Developer/brk/modules/brk-client/index.js:1922](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1922)
***
@@ -86,7 +86,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1843](https://github.com/
> **m2sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1844](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1844)
Defined in: [Developer/brk/modules/brk-client/index.js:1923](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1923)
***
@@ -94,7 +94,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1844](https://github.com/
> **m2sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1845](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1845)
Defined in: [Developer/brk/modules/brk-client/index.js:1924](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1924)
***
@@ -102,7 +102,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1845](https://github.com/
> **m3sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1846](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1846)
Defined in: [Developer/brk/modules/brk-client/index.js:1925](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1925)
***
@@ -110,7 +110,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1846](https://github.com/
> **m3sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1847](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1847)
Defined in: [Developer/brk/modules/brk-client/index.js:1926](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1926)
***
@@ -118,7 +118,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1847](https://github.com/
> **p05sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1848](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1848)
Defined in: [Developer/brk/modules/brk-client/index.js:1927](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1927)
***
@@ -126,7 +126,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1848](https://github.com/
> **p05sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1849](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1849)
Defined in: [Developer/brk/modules/brk-client/index.js:1928](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1928)
***
@@ -134,7 +134,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1849](https://github.com/
> **p15sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1850](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1850)
Defined in: [Developer/brk/modules/brk-client/index.js:1929](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1929)
***
@@ -142,7 +142,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1850](https://github.com/
> **p15sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1851](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1851)
Defined in: [Developer/brk/modules/brk-client/index.js:1930](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1930)
***
@@ -150,7 +150,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1851](https://github.com/
> **p1sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1852](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1852)
Defined in: [Developer/brk/modules/brk-client/index.js:1931](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1931)
***
@@ -158,7 +158,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1852](https://github.com/
> **p1sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1853](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1853)
Defined in: [Developer/brk/modules/brk-client/index.js:1932](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1932)
***
@@ -166,7 +166,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1853](https://github.com/
> **p25sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1854](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1854)
Defined in: [Developer/brk/modules/brk-client/index.js:1933](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1933)
***
@@ -174,7 +174,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1854](https://github.com/
> **p25sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1855](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1855)
Defined in: [Developer/brk/modules/brk-client/index.js:1934](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1934)
***
@@ -182,7 +182,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1855](https://github.com/
> **p2sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1856](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1856)
Defined in: [Developer/brk/modules/brk-client/index.js:1935](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1935)
***
@@ -190,7 +190,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1856](https://github.com/
> **p2sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1857](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1857)
Defined in: [Developer/brk/modules/brk-client/index.js:1936](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1936)
***
@@ -198,7 +198,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1857](https://github.com/
> **p3sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1858](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1858)
Defined in: [Developer/brk/modules/brk-client/index.js:1937](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1937)
***
@@ -206,7 +206,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1858](https://github.com/
> **p3sdUsd**: [`DollarsSatsPattern2`](DollarsSatsPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1859](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1859)
Defined in: [Developer/brk/modules/brk-client/index.js:1938](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1938)
***
@@ -214,7 +214,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1859](https://github.com/
> **sd**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1860](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1860)
Defined in: [Developer/brk/modules/brk-client/index.js:1939](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1939)
***
@@ -222,7 +222,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1860](https://github.com/
> **sma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1861](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1861)
Defined in: [Developer/brk/modules/brk-client/index.js:1940](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1940)
***
@@ -230,4 +230,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:1861](https://github.com/
> **zscore**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1862](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1862)
Defined in: [Developer/brk/modules/brk-client/index.js:1941](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1941)
@@ -6,7 +6,7 @@
# Interface: \_10y1m1w1y2y3m3y4y5y6m6y8yPattern2\<T\>
Defined in: [Developer/brk/modules/brk-client/index.js:2423](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2423)
Defined in: [Developer/brk/modules/brk-client/index.js:2502](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2502)
## Type Parameters
@@ -20,7 +20,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2423](https://github.com/
> **\_10y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2424](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2424)
Defined in: [Developer/brk/modules/brk-client/index.js:2503](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2503)
***
@@ -28,7 +28,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2424](https://github.com/
> **\_1m**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2425](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2425)
Defined in: [Developer/brk/modules/brk-client/index.js:2504](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2504)
***
@@ -36,7 +36,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2425](https://github.com/
> **\_1w**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2426](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2426)
Defined in: [Developer/brk/modules/brk-client/index.js:2505](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2505)
***
@@ -44,7 +44,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2426](https://github.com/
> **\_1y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2427](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2427)
Defined in: [Developer/brk/modules/brk-client/index.js:2506](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2506)
***
@@ -52,7 +52,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2427](https://github.com/
> **\_2y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2428](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2428)
Defined in: [Developer/brk/modules/brk-client/index.js:2507](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2507)
***
@@ -60,7 +60,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2428](https://github.com/
> **\_3m**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2429](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2429)
Defined in: [Developer/brk/modules/brk-client/index.js:2508](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2508)
***
@@ -68,7 +68,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2429](https://github.com/
> **\_3y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2430](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2430)
Defined in: [Developer/brk/modules/brk-client/index.js:2509](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2509)
***
@@ -76,7 +76,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2430](https://github.com/
> **\_4y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2431](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2431)
Defined in: [Developer/brk/modules/brk-client/index.js:2510](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2510)
***
@@ -84,7 +84,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2431](https://github.com/
> **\_5y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2432](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2432)
Defined in: [Developer/brk/modules/brk-client/index.js:2511](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2511)
***
@@ -92,7 +92,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2432](https://github.com/
> **\_6m**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2433](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2433)
Defined in: [Developer/brk/modules/brk-client/index.js:2512](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2512)
***
@@ -100,7 +100,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2433](https://github.com/
> **\_6y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2434](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2434)
Defined in: [Developer/brk/modules/brk-client/index.js:2513](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2513)
***
@@ -108,4 +108,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2434](https://github.com/
> **\_8y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2435](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2435)
Defined in: [Developer/brk/modules/brk-client/index.js:2514](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2514)
@@ -6,7 +6,7 @@
# Interface: \_10y1m1w1y2y3m3y4y5y6m6y8yPattern3
Defined in: [Developer/brk/modules/brk-client/index.js:2305](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2305)
Defined in: [Developer/brk/modules/brk-client/index.js:2384](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2384)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2305](https://github.com/
> **\_10y**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2306](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2306)
Defined in: [Developer/brk/modules/brk-client/index.js:2385](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2385)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2306](https://github.com/
> **\_1m**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2307](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2307)
Defined in: [Developer/brk/modules/brk-client/index.js:2386](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2386)
***
@@ -30,7 +30,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2307](https://github.com/
> **\_1w**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2308](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2308)
Defined in: [Developer/brk/modules/brk-client/index.js:2387](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2387)
***
@@ -38,7 +38,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2308](https://github.com/
> **\_1y**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2309](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2309)
Defined in: [Developer/brk/modules/brk-client/index.js:2388](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2388)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2309](https://github.com/
> **\_2y**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2310](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2310)
Defined in: [Developer/brk/modules/brk-client/index.js:2389](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2389)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2310](https://github.com/
> **\_3m**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2311](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2311)
Defined in: [Developer/brk/modules/brk-client/index.js:2390](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2390)
***
@@ -62,7 +62,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2311](https://github.com/
> **\_3y**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2312](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2312)
Defined in: [Developer/brk/modules/brk-client/index.js:2391](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2391)
***
@@ -70,7 +70,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2312](https://github.com/
> **\_4y**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2313](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2313)
Defined in: [Developer/brk/modules/brk-client/index.js:2392](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2392)
***
@@ -78,7 +78,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2313](https://github.com/
> **\_5y**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2314](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2314)
Defined in: [Developer/brk/modules/brk-client/index.js:2393](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2393)
***
@@ -86,7 +86,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2314](https://github.com/
> **\_6m**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2315](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2315)
Defined in: [Developer/brk/modules/brk-client/index.js:2394](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2394)
***
@@ -94,7 +94,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2315](https://github.com/
> **\_6y**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2316](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2316)
Defined in: [Developer/brk/modules/brk-client/index.js:2395](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2395)
***
@@ -102,4 +102,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2316](https://github.com/
> **\_8y**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2317](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2317)
Defined in: [Developer/brk/modules/brk-client/index.js:2396](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2396)
@@ -6,7 +6,7 @@
# Interface: \_10y2y3y4y5y6y8yPattern
Defined in: [Developer/brk/modules/brk-client/index.js:2751](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2751)
Defined in: [Developer/brk/modules/brk-client/index.js:2832](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2832)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2751](https://github.com/
> **\_10y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2752](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2752)
Defined in: [Developer/brk/modules/brk-client/index.js:2833](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2833)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2752](https://github.com/
> **\_2y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2753](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2753)
Defined in: [Developer/brk/modules/brk-client/index.js:2834](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2834)
***
@@ -30,7 +30,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2753](https://github.com/
> **\_3y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2754](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2754)
Defined in: [Developer/brk/modules/brk-client/index.js:2835](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2835)
***
@@ -38,7 +38,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2754](https://github.com/
> **\_4y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2755](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2755)
Defined in: [Developer/brk/modules/brk-client/index.js:2836](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2836)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2755](https://github.com/
> **\_5y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2756](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2756)
Defined in: [Developer/brk/modules/brk-client/index.js:2837](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2837)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2756](https://github.com/
> **\_6y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2757](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2757)
Defined in: [Developer/brk/modules/brk-client/index.js:2838](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2838)
***
@@ -62,4 +62,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2757](https://github.com/
> **\_8y**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2758](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2758)
Defined in: [Developer/brk/modules/brk-client/index.js:2839](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2839)
@@ -6,7 +6,7 @@
# Interface: \_1m1w1y24hBlocksCoinbaseDaysDominanceFeeSubsidyPattern
Defined in: [Developer/brk/modules/brk-client/index.js:2219](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2219)
Defined in: [Developer/brk/modules/brk-client/index.js:2298](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2298)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2219](https://github.com/
> **\_1mBlocksMined**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2220](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2220)
Defined in: [Developer/brk/modules/brk-client/index.js:2299](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2299)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2220](https://github.com/
> **\_1mDominance**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2221](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2221)
Defined in: [Developer/brk/modules/brk-client/index.js:2300](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2300)
***
@@ -30,7 +30,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2221](https://github.com/
> **\_1wBlocksMined**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2222](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2222)
Defined in: [Developer/brk/modules/brk-client/index.js:2301](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2301)
***
@@ -38,7 +38,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2222](https://github.com/
> **\_1wDominance**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2223](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2223)
Defined in: [Developer/brk/modules/brk-client/index.js:2302](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2302)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2223](https://github.com/
> **\_1yBlocksMined**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2224](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2224)
Defined in: [Developer/brk/modules/brk-client/index.js:2303](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2303)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2224](https://github.com/
> **\_1yDominance**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2225](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2225)
Defined in: [Developer/brk/modules/brk-client/index.js:2304](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2304)
***
@@ -62,7 +62,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2225](https://github.com/
> **\_24hBlocksMined**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2226](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2226)
Defined in: [Developer/brk/modules/brk-client/index.js:2305](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2305)
***
@@ -70,7 +70,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2226](https://github.com/
> **\_24hDominance**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2227](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2227)
Defined in: [Developer/brk/modules/brk-client/index.js:2306](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2306)
***
@@ -78,7 +78,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2227](https://github.com/
> **blocksMined**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2228](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2228)
Defined in: [Developer/brk/modules/brk-client/index.js:2307](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2307)
***
@@ -86,7 +86,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2228](https://github.com/
> **blocksSinceBlock**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2229](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2229)
Defined in: [Developer/brk/modules/brk-client/index.js:2308](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2308)
***
@@ -94,7 +94,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2229](https://github.com/
> **coinbase**: [`BitcoinDollarsSatsPattern6`](BitcoinDollarsSatsPattern6.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2230](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2230)
Defined in: [Developer/brk/modules/brk-client/index.js:2309](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2309)
***
@@ -102,7 +102,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2230](https://github.com/
> **daysSinceBlock**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2231](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2231)
Defined in: [Developer/brk/modules/brk-client/index.js:2310](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2310)
***
@@ -110,7 +110,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2231](https://github.com/
> **dominance**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2232](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2232)
Defined in: [Developer/brk/modules/brk-client/index.js:2311](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2311)
***
@@ -118,7 +118,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2232](https://github.com/
> **fee**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2233](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2233)
Defined in: [Developer/brk/modules/brk-client/index.js:2312](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2312)
***
@@ -126,4 +126,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2233](https://github.com/
> **subsidy**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2234](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2234)
Defined in: [Developer/brk/modules/brk-client/index.js:2313](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2313)
@@ -6,7 +6,7 @@
# Interface: \_201520162017201820192020202120222023202420252026Pattern2\<T\>
Defined in: [Developer/brk/modules/brk-client/index.js:2464](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2464)
Defined in: [Developer/brk/modules/brk-client/index.js:2543](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2543)
## Type Parameters
@@ -20,7 +20,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2464](https://github.com/
> **\_2015**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2465](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2465)
Defined in: [Developer/brk/modules/brk-client/index.js:2544](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2544)
***
@@ -28,7 +28,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2465](https://github.com/
> **\_2016**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2466](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2466)
Defined in: [Developer/brk/modules/brk-client/index.js:2545](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2545)
***
@@ -36,7 +36,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2466](https://github.com/
> **\_2017**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2467](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2467)
Defined in: [Developer/brk/modules/brk-client/index.js:2546](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2546)
***
@@ -44,7 +44,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2467](https://github.com/
> **\_2018**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2468](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2468)
Defined in: [Developer/brk/modules/brk-client/index.js:2547](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2547)
***
@@ -52,7 +52,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2468](https://github.com/
> **\_2019**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2469](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2469)
Defined in: [Developer/brk/modules/brk-client/index.js:2548](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2548)
***
@@ -60,7 +60,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2469](https://github.com/
> **\_2020**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2470](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2470)
Defined in: [Developer/brk/modules/brk-client/index.js:2549](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2549)
***
@@ -68,7 +68,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2470](https://github.com/
> **\_2021**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2471](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2471)
Defined in: [Developer/brk/modules/brk-client/index.js:2550](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2550)
***
@@ -76,7 +76,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2471](https://github.com/
> **\_2022**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2472](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2472)
Defined in: [Developer/brk/modules/brk-client/index.js:2551](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2551)
***
@@ -84,7 +84,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2472](https://github.com/
> **\_2023**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2473](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2473)
Defined in: [Developer/brk/modules/brk-client/index.js:2552](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2552)
***
@@ -92,7 +92,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2473](https://github.com/
> **\_2024**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2474](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2474)
Defined in: [Developer/brk/modules/brk-client/index.js:2553](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2553)
***
@@ -100,7 +100,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2474](https://github.com/
> **\_2025**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2475](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2475)
Defined in: [Developer/brk/modules/brk-client/index.js:2554](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2554)
***
@@ -108,4 +108,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2475](https://github.com/
> **\_2026**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`T`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2476](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2476)
Defined in: [Developer/brk/modules/brk-client/index.js:2555](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2555)
@@ -0,0 +1,25 @@
[**brk-client**](../README.md)
***
[brk-client](../globals.md) / \_30dCountPattern
# Interface: \_30dCountPattern
Defined in: [Developer/brk/modules/brk-client/index.js:3309](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3309)
## Properties
### \_30dChange
> **\_30dChange**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:3310](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3310)
***
### count
> **count**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:3311](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3311)
@@ -6,7 +6,7 @@
# Interface: \_30dHalvedTotalPattern
Defined in: [Developer/brk/modules/brk-client/index.js:3081](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L3081)
Defined in: [Developer/brk/modules/brk-client/index.js:3162](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3162)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:3081](https://github.com/
> **\_30dChange**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:3082](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L3082)
Defined in: [Developer/brk/modules/brk-client/index.js:3163](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3163)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:3082](https://github.com/
> **halved**: [`BitcoinDollarsSatsPattern4`](BitcoinDollarsSatsPattern4.md)
Defined in: [Developer/brk/modules/brk-client/index.js:3083](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L3083)
Defined in: [Developer/brk/modules/brk-client/index.js:3164](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3164)
***
@@ -30,4 +30,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:3083](https://github.com/
> **total**: [`BitcoinDollarsSatsPattern4`](BitcoinDollarsSatsPattern4.md)
Defined in: [Developer/brk/modules/brk-client/index.js:3084](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L3084)
Defined in: [Developer/brk/modules/brk-client/index.js:3165](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3165)
@@ -6,7 +6,7 @@
# Interface: ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern
Defined in: [Developer/brk/modules/brk-client/index.js:2720](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2720)
Defined in: [Developer/brk/modules/brk-client/index.js:2696](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2696)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2720](https://github.com/
> **activity**: [`CoinblocksCoindaysSatblocksSatdaysSentPattern`](CoinblocksCoindaysSatblocksSatdaysSentPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2721](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2721)
Defined in: [Developer/brk/modules/brk-client/index.js:2697](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2697)
***
@@ -22,7 +22,15 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2721](https://github.com/
> **addrCount**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2722](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2722)
Defined in: [Developer/brk/modules/brk-client/index.js:2698](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2698)
***
### addrCount30dChange
> **addrCount30dChange**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2699](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2699)
***
@@ -30,7 +38,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2722](https://github.com/
> **costBasis**: [`MaxMinPattern`](MaxMinPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2723](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2723)
Defined in: [Developer/brk/modules/brk-client/index.js:2700](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2700)
***
@@ -38,15 +46,15 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2723](https://github.com/
> **outputs**: [`UtxoPattern`](UtxoPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2724](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2724)
Defined in: [Developer/brk/modules/brk-client/index.js:2701](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2701)
***
### realized
> **realized**: [`CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern`](CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern.md)
> **realized**: [`CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern`](CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2725](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2725)
Defined in: [Developer/brk/modules/brk-client/index.js:2702](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2702)
***
@@ -54,7 +62,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2725](https://github.com/
> **relative**: [`InvestedNegNetNuplSupplyUnrealizedPattern`](InvestedNegNetNuplSupplyUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2726](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2726)
Defined in: [Developer/brk/modules/brk-client/index.js:2703](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2703)
***
@@ -62,7 +70,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2726](https://github.com/
> **supply**: [`_30dHalvedTotalPattern`](30dHalvedTotalPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2727](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2727)
Defined in: [Developer/brk/modules/brk-client/index.js:2704](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2704)
***
@@ -70,4 +78,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2727](https://github.com/
> **unrealized**: [`GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern`](GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2728](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2728)
Defined in: [Developer/brk/modules/brk-client/index.js:2705](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2705)
@@ -6,7 +6,7 @@
# Interface: ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern
Defined in: [Developer/brk/modules/brk-client/index.js:2780](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2780)
Defined in: [Developer/brk/modules/brk-client/index.js:2861](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2861)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2780](https://github.com/
> **activity**: [`CoinblocksCoindaysSatblocksSatdaysSentPattern`](CoinblocksCoindaysSatblocksSatdaysSentPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2781](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2781)
Defined in: [Developer/brk/modules/brk-client/index.js:2862](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2862)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2781](https://github.com/
> **costBasis**: [`InvestedMaxMinPercentilesSpotPattern`](InvestedMaxMinPercentilesSpotPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2782](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2782)
Defined in: [Developer/brk/modules/brk-client/index.js:2863](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2863)
***
@@ -30,15 +30,15 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2782](https://github.com/
> **outputs**: [`UtxoPattern`](UtxoPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2783](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2783)
Defined in: [Developer/brk/modules/brk-client/index.js:2864](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2864)
***
### realized
> **realized**: [`CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2`](CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2.md)
> **realized**: [`CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2`](CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2784](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2784)
Defined in: [Developer/brk/modules/brk-client/index.js:2865](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2865)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2784](https://github.com/
> **relative**: [`InvestedNegNetSupplyUnrealizedPattern`](InvestedNegNetSupplyUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2785](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2785)
Defined in: [Developer/brk/modules/brk-client/index.js:2866](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2866)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2785](https://github.com/
> **supply**: [`_30dHalvedTotalPattern`](30dHalvedTotalPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2786](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2786)
Defined in: [Developer/brk/modules/brk-client/index.js:2867](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2867)
***
@@ -62,4 +62,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2786](https://github.com/
> **unrealized**: [`GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern`](GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2787](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2787)
Defined in: [Developer/brk/modules/brk-client/index.js:2868](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2868)
@@ -6,7 +6,7 @@
# Interface: ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern3
Defined in: [Developer/brk/modules/brk-client/index.js:2896](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2896)
Defined in: [Developer/brk/modules/brk-client/index.js:2977](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2977)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2896](https://github.com/
> **activity**: [`CoinblocksCoindaysSatblocksSatdaysSentPattern`](CoinblocksCoindaysSatblocksSatdaysSentPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2897](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2897)
Defined in: [Developer/brk/modules/brk-client/index.js:2978](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2978)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2897](https://github.com/
> **costBasis**: [`MaxMinPattern`](MaxMinPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2898](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2898)
Defined in: [Developer/brk/modules/brk-client/index.js:2979](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2979)
***
@@ -30,15 +30,15 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2898](https://github.com/
> **outputs**: [`UtxoPattern`](UtxoPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2899](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2899)
Defined in: [Developer/brk/modules/brk-client/index.js:2980](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2980)
***
### realized
> **realized**: [`CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern`](CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern.md)
> **realized**: [`CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern`](CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2900](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2900)
Defined in: [Developer/brk/modules/brk-client/index.js:2981](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2981)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2900](https://github.com/
> **relative**: [`InvestedSupplyPattern`](InvestedSupplyPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2901](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2901)
Defined in: [Developer/brk/modules/brk-client/index.js:2982](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2982)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2901](https://github.com/
> **supply**: [`_30dHalvedTotalPattern`](30dHalvedTotalPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2902](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2902)
Defined in: [Developer/brk/modules/brk-client/index.js:2983](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2983)
***
@@ -62,4 +62,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2902](https://github.com/
> **unrealized**: [`GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern`](GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2903](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2903)
Defined in: [Developer/brk/modules/brk-client/index.js:2984](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2984)
@@ -6,7 +6,7 @@
# Interface: ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern4
Defined in: [Developer/brk/modules/brk-client/index.js:2838](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2838)
Defined in: [Developer/brk/modules/brk-client/index.js:2919](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2919)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2838](https://github.com/
> **activity**: [`CoinblocksCoindaysSatblocksSatdaysSentPattern`](CoinblocksCoindaysSatblocksSatdaysSentPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2839](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2839)
Defined in: [Developer/brk/modules/brk-client/index.js:2920](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2920)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2839](https://github.com/
> **costBasis**: [`MaxMinPattern`](MaxMinPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2840](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2840)
Defined in: [Developer/brk/modules/brk-client/index.js:2921](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2921)
***
@@ -30,15 +30,15 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2840](https://github.com/
> **outputs**: [`UtxoPattern`](UtxoPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2841](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2841)
Defined in: [Developer/brk/modules/brk-client/index.js:2922](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2922)
***
### realized
> **realized**: [`CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern`](CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern.md)
> **realized**: [`CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern`](CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2842](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2842)
Defined in: [Developer/brk/modules/brk-client/index.js:2923](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2923)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2842](https://github.com/
> **relative**: [`InvestedNegNetNuplSupplyUnrealizedPattern`](InvestedNegNetNuplSupplyUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2843](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2843)
Defined in: [Developer/brk/modules/brk-client/index.js:2924](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2924)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2843](https://github.com/
> **supply**: [`_30dHalvedTotalPattern`](30dHalvedTotalPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2844](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2844)
Defined in: [Developer/brk/modules/brk-client/index.js:2925](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2925)
***
@@ -62,4 +62,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2844](https://github.com/
> **unrealized**: [`GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern`](GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2845](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2845)
Defined in: [Developer/brk/modules/brk-client/index.js:2926](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2926)
@@ -6,7 +6,7 @@
# Interface: ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern5
Defined in: [Developer/brk/modules/brk-client/index.js:2809](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2809)
Defined in: [Developer/brk/modules/brk-client/index.js:2890](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2890)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2809](https://github.com/
> **activity**: [`CoinblocksCoindaysSatblocksSatdaysSentPattern`](CoinblocksCoindaysSatblocksSatdaysSentPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2810](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2810)
Defined in: [Developer/brk/modules/brk-client/index.js:2891](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2891)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2810](https://github.com/
> **costBasis**: [`MaxMinPattern`](MaxMinPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2811](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2811)
Defined in: [Developer/brk/modules/brk-client/index.js:2892](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2892)
***
@@ -30,15 +30,15 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2811](https://github.com/
> **outputs**: [`UtxoPattern`](UtxoPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2812](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2812)
Defined in: [Developer/brk/modules/brk-client/index.js:2893](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2893)
***
### realized
> **realized**: [`AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2`](AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2.md)
> **realized**: [`AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2`](AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2813](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2813)
Defined in: [Developer/brk/modules/brk-client/index.js:2894](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2894)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2813](https://github.com/
> **relative**: [`InvestedNegNetNuplSupplyUnrealizedPattern3`](InvestedNegNetNuplSupplyUnrealizedPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2814](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2814)
Defined in: [Developer/brk/modules/brk-client/index.js:2895](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2895)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2814](https://github.com/
> **supply**: [`_30dHalvedTotalPattern`](30dHalvedTotalPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2815](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2815)
Defined in: [Developer/brk/modules/brk-client/index.js:2896](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2896)
***
@@ -62,4 +62,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2815](https://github.com/
> **unrealized**: [`GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern`](GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2816](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2816)
Defined in: [Developer/brk/modules/brk-client/index.js:2897](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2897)
@@ -6,7 +6,7 @@
# Interface: ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern6
Defined in: [Developer/brk/modules/brk-client/index.js:2867](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2867)
Defined in: [Developer/brk/modules/brk-client/index.js:2948](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2948)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2867](https://github.com/
> **activity**: [`CoinblocksCoindaysSatblocksSatdaysSentPattern`](CoinblocksCoindaysSatblocksSatdaysSentPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2868](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2868)
Defined in: [Developer/brk/modules/brk-client/index.js:2949](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2949)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2868](https://github.com/
> **costBasis**: [`MaxMinPattern`](MaxMinPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2869](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2869)
Defined in: [Developer/brk/modules/brk-client/index.js:2950](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2950)
***
@@ -30,15 +30,15 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2869](https://github.com/
> **outputs**: [`UtxoPattern`](UtxoPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2870](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2870)
Defined in: [Developer/brk/modules/brk-client/index.js:2951](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2951)
***
### realized
> **realized**: [`CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern`](CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern.md)
> **realized**: [`CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern`](CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2871](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2871)
Defined in: [Developer/brk/modules/brk-client/index.js:2952](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2952)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2871](https://github.com/
> **relative**: [`InvestedNegNetNuplSupplyUnrealizedPattern3`](InvestedNegNetNuplSupplyUnrealizedPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2872](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2872)
Defined in: [Developer/brk/modules/brk-client/index.js:2953](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2953)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2872](https://github.com/
> **supply**: [`_30dHalvedTotalPattern`](30dHalvedTotalPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2873](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2873)
Defined in: [Developer/brk/modules/brk-client/index.js:2954](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2954)
***
@@ -62,4 +62,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2873](https://github.com/
> **unrealized**: [`GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern`](GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2874](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2874)
Defined in: [Developer/brk/modules/brk-client/index.js:2955](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2955)
@@ -6,7 +6,7 @@
# Interface: ActivityCostOutputsRealizedSupplyUnrealizedPattern
Defined in: [Developer/brk/modules/brk-client/index.js:2925](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2925)
Defined in: [Developer/brk/modules/brk-client/index.js:3006](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3006)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2925](https://github.com/
> **activity**: [`CoinblocksCoindaysSatblocksSatdaysSentPattern`](CoinblocksCoindaysSatblocksSatdaysSentPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2926](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2926)
Defined in: [Developer/brk/modules/brk-client/index.js:3007](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3007)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2926](https://github.com/
> **costBasis**: [`MaxMinPattern`](MaxMinPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2927](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2927)
Defined in: [Developer/brk/modules/brk-client/index.js:3008](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3008)
***
@@ -30,15 +30,15 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2927](https://github.com/
> **outputs**: [`UtxoPattern`](UtxoPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2928](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2928)
Defined in: [Developer/brk/modules/brk-client/index.js:3009](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3009)
***
### realized
> **realized**: [`CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern`](CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern.md)
> **realized**: [`CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern`](CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2929](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2929)
Defined in: [Developer/brk/modules/brk-client/index.js:3010](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3010)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2929](https://github.com/
> **supply**: [`_30dHalvedTotalPattern`](30dHalvedTotalPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2930](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2930)
Defined in: [Developer/brk/modules/brk-client/index.js:3011](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3011)
***
@@ -54,4 +54,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2930](https://github.com/
> **unrealized**: [`GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern`](GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2931](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2931)
Defined in: [Developer/brk/modules/brk-client/index.js:3012](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L3012)
@@ -6,7 +6,7 @@
# Interface: AddressChainStats
Defined in: [Developer/brk/modules/brk-client/index.js:16](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L16)
Defined in: [Developer/brk/modules/brk-client/index.js:16](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L16)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:16](https://github.com/bi
> **fundedTxoCount**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:17](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L17)
Defined in: [Developer/brk/modules/brk-client/index.js:17](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L17)
Total number of transaction outputs that funded this address
@@ -24,7 +24,7 @@ Total number of transaction outputs that funded this address
> **fundedTxoSum**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:18](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L18)
Defined in: [Developer/brk/modules/brk-client/index.js:18](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L18)
Total amount in satoshis received by this address across all funded outputs
@@ -34,7 +34,7 @@ Total amount in satoshis received by this address across all funded outputs
> **spentTxoCount**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:19](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L19)
Defined in: [Developer/brk/modules/brk-client/index.js:19](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L19)
Total number of transaction outputs spent from this address
@@ -44,7 +44,7 @@ Total number of transaction outputs spent from this address
> **spentTxoSum**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:20](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L20)
Defined in: [Developer/brk/modules/brk-client/index.js:20](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L20)
Total amount in satoshis spent from this address
@@ -54,7 +54,7 @@ Total amount in satoshis spent from this address
> **txCount**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:21](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L21)
Defined in: [Developer/brk/modules/brk-client/index.js:21](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L21)
Total number of confirmed transactions involving this address
@@ -64,6 +64,6 @@ Total number of confirmed transactions involving this address
> **typeIndex**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:22](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L22)
Defined in: [Developer/brk/modules/brk-client/index.js:22](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L22)
Index of this address within its type on the blockchain
@@ -6,7 +6,7 @@
# Interface: AddressMempoolStats
Defined in: [Developer/brk/modules/brk-client/index.js:29](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L29)
Defined in: [Developer/brk/modules/brk-client/index.js:29](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L29)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:29](https://github.com/bi
> **fundedTxoCount**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:30](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L30)
Defined in: [Developer/brk/modules/brk-client/index.js:30](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L30)
Number of unconfirmed transaction outputs funding this address
@@ -24,7 +24,7 @@ Number of unconfirmed transaction outputs funding this address
> **fundedTxoSum**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:31](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L31)
Defined in: [Developer/brk/modules/brk-client/index.js:31](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L31)
Total amount in satoshis being received in unconfirmed transactions
@@ -34,7 +34,7 @@ Total amount in satoshis being received in unconfirmed transactions
> **spentTxoCount**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:32](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L32)
Defined in: [Developer/brk/modules/brk-client/index.js:32](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L32)
Number of unconfirmed transaction inputs spending from this address
@@ -44,7 +44,7 @@ Number of unconfirmed transaction inputs spending from this address
> **spentTxoSum**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:33](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L33)
Defined in: [Developer/brk/modules/brk-client/index.js:33](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L33)
Total amount in satoshis being spent in unconfirmed transactions
@@ -54,6 +54,6 @@ Total amount in satoshis being spent in unconfirmed transactions
> **txCount**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:34](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L34)
Defined in: [Developer/brk/modules/brk-client/index.js:34](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L34)
Number of unconfirmed transactions involving this address
@@ -6,7 +6,7 @@
# Interface: AddressParam
Defined in: [Developer/brk/modules/brk-client/index.js:37](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L37)
Defined in: [Developer/brk/modules/brk-client/index.js:37](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L37)
## Properties
@@ -14,4 +14,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:37](https://github.com/bi
> **address**: `string`
Defined in: [Developer/brk/modules/brk-client/index.js:38](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L38)
Defined in: [Developer/brk/modules/brk-client/index.js:38](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L38)
@@ -6,7 +6,7 @@
# Interface: AddressStats
Defined in: [Developer/brk/modules/brk-client/index.js:43](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L43)
Defined in: [Developer/brk/modules/brk-client/index.js:43](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L43)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:43](https://github.com/bi
> **address**: `string`
Defined in: [Developer/brk/modules/brk-client/index.js:44](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L44)
Defined in: [Developer/brk/modules/brk-client/index.js:44](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L44)
Bitcoin address string
@@ -24,7 +24,7 @@ Bitcoin address string
> **chainStats**: [`AddressChainStats`](AddressChainStats.md)
Defined in: [Developer/brk/modules/brk-client/index.js:45](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L45)
Defined in: [Developer/brk/modules/brk-client/index.js:45](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L45)
Statistics for confirmed transactions on the blockchain
@@ -34,6 +34,6 @@ Statistics for confirmed transactions on the blockchain
> `optional` **mempoolStats**: [`AddressMempoolStats`](AddressMempoolStats.md) \| `null`
Defined in: [Developer/brk/modules/brk-client/index.js:46](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L46)
Defined in: [Developer/brk/modules/brk-client/index.js:46](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L46)
Statistics for unconfirmed transactions in the mempool
@@ -6,7 +6,7 @@
# Interface: AddressTxidsParam
Defined in: [Developer/brk/modules/brk-client/index.js:49](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L49)
Defined in: [Developer/brk/modules/brk-client/index.js:49](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L49)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:49](https://github.com/bi
> `optional` **afterTxid**: `string` \| `null`
Defined in: [Developer/brk/modules/brk-client/index.js:50](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L50)
Defined in: [Developer/brk/modules/brk-client/index.js:50](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L50)
Txid to paginate from (return transactions before this one)
@@ -24,6 +24,6 @@ Txid to paginate from (return transactions before this one)
> `optional` **limit**: `number`
Defined in: [Developer/brk/modules/brk-client/index.js:51](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L51)
Defined in: [Developer/brk/modules/brk-client/index.js:51](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L51)
Maximum number of results to return. Defaults to 25 if not specified.
@@ -6,7 +6,7 @@
# Interface: AddressValidation
Defined in: [Developer/brk/modules/brk-client/index.js:56](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L56)
Defined in: [Developer/brk/modules/brk-client/index.js:56](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L56)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:56](https://github.com/bi
> `optional` **address**: `string` \| `null`
Defined in: [Developer/brk/modules/brk-client/index.js:58](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L58)
Defined in: [Developer/brk/modules/brk-client/index.js:58](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L58)
The validated address
@@ -24,7 +24,7 @@ The validated address
> `optional` **isscript**: `boolean` \| `null`
Defined in: [Developer/brk/modules/brk-client/index.js:60](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L60)
Defined in: [Developer/brk/modules/brk-client/index.js:60](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L60)
Whether this is a script address (P2SH)
@@ -34,7 +34,7 @@ Whether this is a script address (P2SH)
> **isvalid**: `boolean`
Defined in: [Developer/brk/modules/brk-client/index.js:57](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L57)
Defined in: [Developer/brk/modules/brk-client/index.js:57](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L57)
Whether the address is valid
@@ -44,7 +44,7 @@ Whether the address is valid
> `optional` **iswitness**: `boolean` \| `null`
Defined in: [Developer/brk/modules/brk-client/index.js:61](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L61)
Defined in: [Developer/brk/modules/brk-client/index.js:61](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L61)
Whether this is a witness address
@@ -54,7 +54,7 @@ Whether this is a witness address
> `optional` **scriptPubKey**: `string` \| `null`
Defined in: [Developer/brk/modules/brk-client/index.js:59](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L59)
Defined in: [Developer/brk/modules/brk-client/index.js:59](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L59)
The scriptPubKey in hex
@@ -64,7 +64,7 @@ The scriptPubKey in hex
> `optional` **witnessProgram**: `string` \| `null`
Defined in: [Developer/brk/modules/brk-client/index.js:63](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L63)
Defined in: [Developer/brk/modules/brk-client/index.js:63](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L63)
Witness program in hex
@@ -74,6 +74,6 @@ Witness program in hex
> `optional` **witnessVersion**: `number` \| `null`
Defined in: [Developer/brk/modules/brk-client/index.js:62](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L62)
Defined in: [Developer/brk/modules/brk-client/index.js:62](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L62)
Witness version (0 for P2WPKH/P2WSH, 1 for P2TR)
@@ -0,0 +1,449 @@
[**brk-client**](../README.md)
***
[brk-client](../globals.md) / AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern
# Interface: AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern
Defined in: [Developer/brk/modules/brk-client/index.js:1441](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1441)
## Properties
### adjustedSopr
> **adjustedSopr**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1442](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1442)
***
### adjustedSopr30dEma
> **adjustedSopr30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1443](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1443)
***
### adjustedSopr7dEma
> **adjustedSopr7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1444](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1444)
***
### adjustedValueCreated
> **adjustedValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1445](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1445)
***
### adjustedValueDestroyed
> **adjustedValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1446](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1446)
***
### capitulationFlow
> **capitulationFlow**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1448](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1448)
***
### capRaw
> **capRaw**: [`MetricPattern11`](../type-aliases/MetricPattern11.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1447](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1447)
***
### investorCapRaw
> **investorCapRaw**: [`MetricPattern11`](../type-aliases/MetricPattern11.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1449](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1449)
***
### investorPrice
> **investorPrice**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1450](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1450)
***
### investorPriceCents
> **investorPriceCents**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1451](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1451)
***
### investorPriceExtra
> **investorPriceExtra**: [`RatioPattern`](RatioPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1452](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1452)
***
### lossValueCreated
> **lossValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1453](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1453)
***
### lossValueDestroyed
> **lossValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1454](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1454)
***
### lowerPriceBand
> **lowerPriceBand**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1455](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1455)
***
### mvrv
> **mvrv**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1456](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1456)
***
### negRealizedLoss
> **negRealizedLoss**: [`CumulativeSumPattern2`](CumulativeSumPattern2.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1457](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1457)
***
### netRealizedPnl
> **netRealizedPnl**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1458](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1458)
***
### netRealizedPnl7dEma
> **netRealizedPnl7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1459](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1459)
***
### netRealizedPnlCumulative30dDelta
> **netRealizedPnlCumulative30dDelta**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1460](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1460)
***
### netRealizedPnlCumulative30dDeltaRelToMarketCap
> **netRealizedPnlCumulative30dDeltaRelToMarketCap**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1461](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1461)
***
### netRealizedPnlCumulative30dDeltaRelToRealizedCap
> **netRealizedPnlCumulative30dDeltaRelToRealizedCap**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1462](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1462)
***
### netRealizedPnlRelToRealizedCap
> **netRealizedPnlRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1463](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1463)
***
### peakRegret
> **peakRegret**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1464](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1464)
***
### peakRegretRelToRealizedCap
> **peakRegretRelToRealizedCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1465](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1465)
***
### profitFlow
> **profitFlow**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1466](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1466)
***
### profitValueCreated
> **profitValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1467](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1467)
***
### profitValueDestroyed
> **profitValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1468](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1468)
***
### realizedCap
> **realizedCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1469](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1469)
***
### realizedCap30dDelta
> **realizedCap30dDelta**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1470](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1470)
***
### realizedCapCents
> **realizedCapCents**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1471](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1471)
***
### realizedCapRelToOwnMarketCap
> **realizedCapRelToOwnMarketCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1472](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1472)
***
### realizedLoss
> **realizedLoss**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1473](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1473)
***
### realizedLoss7dEma
> **realizedLoss7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1474](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1474)
***
### realizedLossRelToRealizedCap
> **realizedLossRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1475](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1475)
***
### realizedPrice
> **realizedPrice**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1476](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1476)
***
### realizedPriceExtra
> **realizedPriceExtra**: [`RatioPattern`](RatioPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1477](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1477)
***
### realizedProfit
> **realizedProfit**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1478](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1478)
***
### realizedProfit7dEma
> **realizedProfit7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1479](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1479)
***
### realizedProfitRelToRealizedCap
> **realizedProfitRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1480](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1480)
***
### realizedProfitToLossRatio
> **realizedProfitToLossRatio**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1481](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1481)
***
### realizedValue
> **realizedValue**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1482](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1482)
***
### sellSideRiskRatio
> **sellSideRiskRatio**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1483](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1483)
***
### sellSideRiskRatio30dEma
> **sellSideRiskRatio30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1484](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1484)
***
### sellSideRiskRatio7dEma
> **sellSideRiskRatio7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1485](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1485)
***
### sentInLoss
> **sentInLoss**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1486](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1486)
***
### sentInLoss14dEma
> **sentInLoss14dEma**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1487](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1487)
***
### sentInProfit
> **sentInProfit**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1488](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1488)
***
### sentInProfit14dEma
> **sentInProfit14dEma**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1489](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1489)
***
### sopr
> **sopr**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1490](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1490)
***
### sopr30dEma
> **sopr30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1491](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1491)
***
### sopr7dEma
> **sopr7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1492](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1492)
***
### totalRealizedPnl
> **totalRealizedPnl**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1493](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1493)
***
### upperPriceBand
> **upperPriceBand**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1494](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1494)
***
### valueCreated
> **valueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1495](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1495)
***
### valueDestroyed
> **valueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1496](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1496)
@@ -0,0 +1,433 @@
[**brk-client**](../README.md)
***
[brk-client](../globals.md) / AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2
# Interface: AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2
Defined in: [Developer/brk/modules/brk-client/index.js:1566](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1566)
## Properties
### adjustedSopr
> **adjustedSopr**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1567](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1567)
***
### adjustedSopr30dEma
> **adjustedSopr30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1568](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1568)
***
### adjustedSopr7dEma
> **adjustedSopr7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1569](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1569)
***
### adjustedValueCreated
> **adjustedValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1570](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1570)
***
### adjustedValueDestroyed
> **adjustedValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1571](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1571)
***
### capitulationFlow
> **capitulationFlow**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1573](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1573)
***
### capRaw
> **capRaw**: [`MetricPattern11`](../type-aliases/MetricPattern11.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1572](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1572)
***
### investorCapRaw
> **investorCapRaw**: [`MetricPattern11`](../type-aliases/MetricPattern11.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1574](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1574)
***
### investorPrice
> **investorPrice**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1575](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1575)
***
### investorPriceCents
> **investorPriceCents**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1576](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1576)
***
### investorPriceExtra
> **investorPriceExtra**: [`RatioPattern2`](RatioPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1577](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1577)
***
### lossValueCreated
> **lossValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1578](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1578)
***
### lossValueDestroyed
> **lossValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1579](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1579)
***
### lowerPriceBand
> **lowerPriceBand**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1580](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1580)
***
### mvrv
> **mvrv**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1581](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1581)
***
### negRealizedLoss
> **negRealizedLoss**: [`CumulativeSumPattern2`](CumulativeSumPattern2.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1582](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1582)
***
### netRealizedPnl
> **netRealizedPnl**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1583](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1583)
***
### netRealizedPnl7dEma
> **netRealizedPnl7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1584](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1584)
***
### netRealizedPnlCumulative30dDelta
> **netRealizedPnlCumulative30dDelta**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1585](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1585)
***
### netRealizedPnlCumulative30dDeltaRelToMarketCap
> **netRealizedPnlCumulative30dDeltaRelToMarketCap**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1586](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1586)
***
### netRealizedPnlCumulative30dDeltaRelToRealizedCap
> **netRealizedPnlCumulative30dDeltaRelToRealizedCap**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1587](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1587)
***
### netRealizedPnlRelToRealizedCap
> **netRealizedPnlRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1588](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1588)
***
### peakRegret
> **peakRegret**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1589](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1589)
***
### peakRegretRelToRealizedCap
> **peakRegretRelToRealizedCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1590](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1590)
***
### profitFlow
> **profitFlow**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1591](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1591)
***
### profitValueCreated
> **profitValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1592](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1592)
***
### profitValueDestroyed
> **profitValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1593](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1593)
***
### realizedCap
> **realizedCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1594](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1594)
***
### realizedCap30dDelta
> **realizedCap30dDelta**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1595](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1595)
***
### realizedCapCents
> **realizedCapCents**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1596](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1596)
***
### realizedLoss
> **realizedLoss**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1597](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1597)
***
### realizedLoss7dEma
> **realizedLoss7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1598](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1598)
***
### realizedLossRelToRealizedCap
> **realizedLossRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1599](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1599)
***
### realizedPrice
> **realizedPrice**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1600](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1600)
***
### realizedPriceExtra
> **realizedPriceExtra**: [`RatioPattern2`](RatioPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1601](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1601)
***
### realizedProfit
> **realizedProfit**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1602](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1602)
***
### realizedProfit7dEma
> **realizedProfit7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1603](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1603)
***
### realizedProfitRelToRealizedCap
> **realizedProfitRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1604](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1604)
***
### realizedValue
> **realizedValue**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1605](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1605)
***
### sellSideRiskRatio
> **sellSideRiskRatio**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1606](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1606)
***
### sellSideRiskRatio30dEma
> **sellSideRiskRatio30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1607](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1607)
***
### sellSideRiskRatio7dEma
> **sellSideRiskRatio7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1608](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1608)
***
### sentInLoss
> **sentInLoss**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1609](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1609)
***
### sentInLoss14dEma
> **sentInLoss14dEma**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1610](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1610)
***
### sentInProfit
> **sentInProfit**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1611](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1611)
***
### sentInProfit14dEma
> **sentInProfit14dEma**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1612](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1612)
***
### sopr
> **sopr**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1613](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1613)
***
### sopr30dEma
> **sopr30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1614](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1614)
***
### sopr7dEma
> **sopr7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1615](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1615)
***
### totalRealizedPnl
> **totalRealizedPnl**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1616](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1616)
***
### upperPriceBand
> **upperPriceBand**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1617](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1617)
***
### valueCreated
> **valueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1618](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1618)
***
### valueDestroyed
> **valueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1619](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L1619)
@@ -1,433 +0,0 @@
[**brk-client**](../README.md)
***
[brk-client](../globals.md) / AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern
# Interface: AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern
Defined in: [Developer/brk/modules/brk-client/index.js:1378](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1378)
## Properties
### adjustedSopr
> **adjustedSopr**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1379](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1379)
***
### adjustedSopr30dEma
> **adjustedSopr30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1380](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1380)
***
### adjustedSopr7dEma
> **adjustedSopr7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1381](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1381)
***
### adjustedValueCreated
> **adjustedValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1382](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1382)
***
### adjustedValueDestroyed
> **adjustedValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1383](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1383)
***
### capitulationFlow
> **capitulationFlow**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1385](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1385)
***
### capRaw
> **capRaw**: [`MetricPattern11`](../type-aliases/MetricPattern11.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1384](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1384)
***
### investorCapRaw
> **investorCapRaw**: [`MetricPattern11`](../type-aliases/MetricPattern11.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1386](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1386)
***
### investorPrice
> **investorPrice**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1387](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1387)
***
### investorPriceCents
> **investorPriceCents**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1388](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1388)
***
### investorPriceExtra
> **investorPriceExtra**: [`RatioPattern`](RatioPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1389](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1389)
***
### lossValueCreated
> **lossValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1390](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1390)
***
### lossValueDestroyed
> **lossValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1391](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1391)
***
### mvrv
> **mvrv**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1392](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1392)
***
### negRealizedLoss
> **negRealizedLoss**: [`CumulativeSumPattern2`](CumulativeSumPattern2.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1393](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1393)
***
### netRealizedPnl
> **netRealizedPnl**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1394](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1394)
***
### netRealizedPnl7dEma
> **netRealizedPnl7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1395](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1395)
***
### netRealizedPnlCumulative30dDelta
> **netRealizedPnlCumulative30dDelta**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1396](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1396)
***
### netRealizedPnlCumulative30dDeltaRelToMarketCap
> **netRealizedPnlCumulative30dDeltaRelToMarketCap**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1397](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1397)
***
### netRealizedPnlCumulative30dDeltaRelToRealizedCap
> **netRealizedPnlCumulative30dDeltaRelToRealizedCap**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1398](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1398)
***
### netRealizedPnlRelToRealizedCap
> **netRealizedPnlRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1399](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1399)
***
### peakRegret
> **peakRegret**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1400](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1400)
***
### peakRegretRelToRealizedCap
> **peakRegretRelToRealizedCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1401](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1401)
***
### profitFlow
> **profitFlow**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1402](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1402)
***
### profitValueCreated
> **profitValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1403](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1403)
***
### profitValueDestroyed
> **profitValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1404](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1404)
***
### realizedCap
> **realizedCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1405](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1405)
***
### realizedCap30dDelta
> **realizedCap30dDelta**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1406](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1406)
***
### realizedCapCents
> **realizedCapCents**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1407](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1407)
***
### realizedCapRelToOwnMarketCap
> **realizedCapRelToOwnMarketCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1408](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1408)
***
### realizedLoss
> **realizedLoss**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1409](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1409)
***
### realizedLoss7dEma
> **realizedLoss7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1410](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1410)
***
### realizedLossRelToRealizedCap
> **realizedLossRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1411](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1411)
***
### realizedPrice
> **realizedPrice**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1412](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1412)
***
### realizedPriceExtra
> **realizedPriceExtra**: [`RatioPattern`](RatioPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1413](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1413)
***
### realizedProfit
> **realizedProfit**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1414](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1414)
***
### realizedProfit7dEma
> **realizedProfit7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1415](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1415)
***
### realizedProfitRelToRealizedCap
> **realizedProfitRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1416](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1416)
***
### realizedProfitToLossRatio
> **realizedProfitToLossRatio**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1417](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1417)
***
### realizedValue
> **realizedValue**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1418](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1418)
***
### sellSideRiskRatio
> **sellSideRiskRatio**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1419](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1419)
***
### sellSideRiskRatio30dEma
> **sellSideRiskRatio30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1420](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1420)
***
### sellSideRiskRatio7dEma
> **sellSideRiskRatio7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1421](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1421)
***
### sentInLoss
> **sentInLoss**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1422](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1422)
***
### sentInLoss14dEma
> **sentInLoss14dEma**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1423](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1423)
***
### sentInProfit
> **sentInProfit**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1424](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1424)
***
### sentInProfit14dEma
> **sentInProfit14dEma**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1425](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1425)
***
### sopr
> **sopr**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1426](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1426)
***
### sopr30dEma
> **sopr30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1427](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1427)
***
### sopr7dEma
> **sopr7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1428](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1428)
***
### totalRealizedPnl
> **totalRealizedPnl**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1429](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1429)
***
### valueCreated
> **valueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1430](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1430)
***
### valueDestroyed
> **valueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1431](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1431)
@@ -1,417 +0,0 @@
[**brk-client**](../README.md)
***
[brk-client](../globals.md) / AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2
# Interface: AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2
Defined in: [Developer/brk/modules/brk-client/index.js:1499](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1499)
## Properties
### adjustedSopr
> **adjustedSopr**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1500](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1500)
***
### adjustedSopr30dEma
> **adjustedSopr30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1501](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1501)
***
### adjustedSopr7dEma
> **adjustedSopr7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1502](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1502)
***
### adjustedValueCreated
> **adjustedValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1503](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1503)
***
### adjustedValueDestroyed
> **adjustedValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1504](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1504)
***
### capitulationFlow
> **capitulationFlow**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1506](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1506)
***
### capRaw
> **capRaw**: [`MetricPattern11`](../type-aliases/MetricPattern11.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1505](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1505)
***
### investorCapRaw
> **investorCapRaw**: [`MetricPattern11`](../type-aliases/MetricPattern11.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1507](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1507)
***
### investorPrice
> **investorPrice**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1508](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1508)
***
### investorPriceCents
> **investorPriceCents**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1509](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1509)
***
### investorPriceExtra
> **investorPriceExtra**: [`RatioPattern2`](RatioPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1510](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1510)
***
### lossValueCreated
> **lossValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1511](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1511)
***
### lossValueDestroyed
> **lossValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1512](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1512)
***
### mvrv
> **mvrv**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1513](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1513)
***
### negRealizedLoss
> **negRealizedLoss**: [`CumulativeSumPattern2`](CumulativeSumPattern2.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1514](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1514)
***
### netRealizedPnl
> **netRealizedPnl**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1515](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1515)
***
### netRealizedPnl7dEma
> **netRealizedPnl7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1516](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1516)
***
### netRealizedPnlCumulative30dDelta
> **netRealizedPnlCumulative30dDelta**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1517](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1517)
***
### netRealizedPnlCumulative30dDeltaRelToMarketCap
> **netRealizedPnlCumulative30dDeltaRelToMarketCap**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1518](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1518)
***
### netRealizedPnlCumulative30dDeltaRelToRealizedCap
> **netRealizedPnlCumulative30dDeltaRelToRealizedCap**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1519](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1519)
***
### netRealizedPnlRelToRealizedCap
> **netRealizedPnlRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1520](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1520)
***
### peakRegret
> **peakRegret**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1521](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1521)
***
### peakRegretRelToRealizedCap
> **peakRegretRelToRealizedCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1522](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1522)
***
### profitFlow
> **profitFlow**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1523](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1523)
***
### profitValueCreated
> **profitValueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1524](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1524)
***
### profitValueDestroyed
> **profitValueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1525](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1525)
***
### realizedCap
> **realizedCap**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1526](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1526)
***
### realizedCap30dDelta
> **realizedCap30dDelta**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1527](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1527)
***
### realizedCapCents
> **realizedCapCents**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1528](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1528)
***
### realizedLoss
> **realizedLoss**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1529](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1529)
***
### realizedLoss7dEma
> **realizedLoss7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1530](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1530)
***
### realizedLossRelToRealizedCap
> **realizedLossRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1531](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1531)
***
### realizedPrice
> **realizedPrice**: [`DollarsSatsPattern`](DollarsSatsPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1532](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1532)
***
### realizedPriceExtra
> **realizedPriceExtra**: [`RatioPattern2`](RatioPattern2.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1533](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1533)
***
### realizedProfit
> **realizedProfit**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1534](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1534)
***
### realizedProfit7dEma
> **realizedProfit7dEma**: [`MetricPattern4`](../type-aliases/MetricPattern4.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1535](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1535)
***
### realizedProfitRelToRealizedCap
> **realizedProfitRelToRealizedCap**: [`CumulativeSumPattern`](CumulativeSumPattern.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1536](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1536)
***
### realizedValue
> **realizedValue**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1537](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1537)
***
### sellSideRiskRatio
> **sellSideRiskRatio**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1538](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1538)
***
### sellSideRiskRatio30dEma
> **sellSideRiskRatio30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1539](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1539)
***
### sellSideRiskRatio7dEma
> **sellSideRiskRatio7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1540](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1540)
***
### sentInLoss
> **sentInLoss**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1541](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1541)
***
### sentInLoss14dEma
> **sentInLoss14dEma**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1542](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1542)
***
### sentInProfit
> **sentInProfit**: [`BitcoinDollarsSatsPattern3`](BitcoinDollarsSatsPattern3.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1543](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1543)
***
### sentInProfit14dEma
> **sentInProfit14dEma**: [`BitcoinDollarsSatsPattern5`](BitcoinDollarsSatsPattern5.md)
Defined in: [Developer/brk/modules/brk-client/index.js:1544](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1544)
***
### sopr
> **sopr**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1545](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1545)
***
### sopr30dEma
> **sopr30dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1546](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1546)
***
### sopr7dEma
> **sopr7dEma**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1547](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1547)
***
### totalRealizedPnl
> **totalRealizedPnl**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1548](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1548)
***
### valueCreated
> **valueCreated**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1549](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1549)
***
### valueDestroyed
> **valueDestroyed**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:1550](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L1550)
@@ -6,76 +6,76 @@
# Interface: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern
Defined in: [Developer/brk/modules/brk-client/index.js:2617](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2617)
Defined in: [Developer/brk/modules/brk-client/index.js:2729](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2729)
## Properties
### all
> **all**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
> **all**: [`_30dCountPattern`](30dCountPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2618](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2618)
Defined in: [Developer/brk/modules/brk-client/index.js:2730](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2730)
***
### p2a
> **p2a**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
> **p2a**: [`_30dCountPattern`](30dCountPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2619](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2619)
Defined in: [Developer/brk/modules/brk-client/index.js:2731](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2731)
***
### p2pk33
> **p2pk33**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
> **p2pk33**: [`_30dCountPattern`](30dCountPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2620](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2620)
Defined in: [Developer/brk/modules/brk-client/index.js:2732](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2732)
***
### p2pk65
> **p2pk65**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
> **p2pk65**: [`_30dCountPattern`](30dCountPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2621](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2621)
Defined in: [Developer/brk/modules/brk-client/index.js:2733](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2733)
***
### p2pkh
> **p2pkh**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
> **p2pkh**: [`_30dCountPattern`](30dCountPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2622](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2622)
Defined in: [Developer/brk/modules/brk-client/index.js:2734](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2734)
***
### p2sh
> **p2sh**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
> **p2sh**: [`_30dCountPattern`](30dCountPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2623](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2623)
Defined in: [Developer/brk/modules/brk-client/index.js:2735](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2735)
***
### p2tr
> **p2tr**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
> **p2tr**: [`_30dCountPattern`](30dCountPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2624](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2624)
Defined in: [Developer/brk/modules/brk-client/index.js:2736](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2736)
***
### p2wpkh
> **p2wpkh**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
> **p2wpkh**: [`_30dCountPattern`](30dCountPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2625](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2625)
Defined in: [Developer/brk/modules/brk-client/index.js:2737](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2737)
***
### p2wsh
> **p2wsh**: [`MetricPattern1`](../type-aliases/MetricPattern1.md)\<`number`\>
> **p2wsh**: [`_30dCountPattern`](30dCountPattern.md)
Defined in: [Developer/brk/modules/brk-client/index.js:2626](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2626)
Defined in: [Developer/brk/modules/brk-client/index.js:2738](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2738)
@@ -6,7 +6,7 @@
# Interface: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern
Defined in: [Developer/brk/modules/brk-client/index.js:2504](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2504)
Defined in: [Developer/brk/modules/brk-client/index.js:2583](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2583)
## Properties
@@ -14,7 +14,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2504](https://github.com/
> **average**: [`MetricPattern2`](../type-aliases/MetricPattern2.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2505](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2505)
Defined in: [Developer/brk/modules/brk-client/index.js:2584](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2584)
***
@@ -22,7 +22,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2505](https://github.com/
> **base**: [`MetricPattern11`](../type-aliases/MetricPattern11.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2506](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2506)
Defined in: [Developer/brk/modules/brk-client/index.js:2585](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2585)
***
@@ -30,7 +30,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2506](https://github.com/
> **cumulative**: [`MetricPattern2`](../type-aliases/MetricPattern2.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2507](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2507)
Defined in: [Developer/brk/modules/brk-client/index.js:2586](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2586)
***
@@ -38,7 +38,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2507](https://github.com/
> **max**: [`MetricPattern2`](../type-aliases/MetricPattern2.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2508](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2508)
Defined in: [Developer/brk/modules/brk-client/index.js:2587](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2587)
***
@@ -46,7 +46,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2508](https://github.com/
> **median**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2509](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2509)
Defined in: [Developer/brk/modules/brk-client/index.js:2588](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2588)
***
@@ -54,7 +54,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2509](https://github.com/
> **min**: [`MetricPattern2`](../type-aliases/MetricPattern2.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2510](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2510)
Defined in: [Developer/brk/modules/brk-client/index.js:2589](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2589)
***
@@ -62,7 +62,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2510](https://github.com/
> **pct10**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2511](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2511)
Defined in: [Developer/brk/modules/brk-client/index.js:2590](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2590)
***
@@ -70,7 +70,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2511](https://github.com/
> **pct25**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2512](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2512)
Defined in: [Developer/brk/modules/brk-client/index.js:2591](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2591)
***
@@ -78,7 +78,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2512](https://github.com/
> **pct75**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2513](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2513)
Defined in: [Developer/brk/modules/brk-client/index.js:2592](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2592)
***
@@ -86,7 +86,7 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2513](https://github.com/
> **pct90**: [`MetricPattern6`](../type-aliases/MetricPattern6.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2514](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2514)
Defined in: [Developer/brk/modules/brk-client/index.js:2593](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2593)
***
@@ -94,4 +94,4 @@ Defined in: [Developer/brk/modules/brk-client/index.js:2514](https://github.com/
> **sum**: [`MetricPattern2`](../type-aliases/MetricPattern2.md)\<`number`\>
Defined in: [Developer/brk/modules/brk-client/index.js:2515](https://github.com/bitcoinresearchkit/brk/blob/36bc1fb4912b070acbe47217b1be5b7c1096f80f/modules/brk-client/index.js#L2515)
Defined in: [Developer/brk/modules/brk-client/index.js:2594](https://github.com/bitcoinresearchkit/brk/blob/ba60b7e4f64e81cffbd4781566a0df0728014881/modules/brk-client/index.js#L2594)

Some files were not shown because too many files have changed in this diff Show More