global: snapshot

This commit is contained in:
nym21
2026-01-12 16:19:23 +01:00
parent 1484eae53c
commit b675b70067
20 changed files with 11573 additions and 6489 deletions

View File

@@ -19,38 +19,46 @@ def test_tree_exists():
def test_fetch_block():
client = BrkClient("http://localhost:3110")
print(client.get_block_height(800000))
print(client.get_block_by_height(800000))
def test_fetch_json_metric():
client = BrkClient("http://localhost:3110")
a = client.get_metric_by_index("price_close", "dateindex")
a = client.get_metric("price_close", "dateindex")
print(a)
def test_fetch_csv_metric():
client = BrkClient("http://localhost:3110")
a = client.get_metric_by_index("price_close", "dateindex", -10, None, None, "csv")
a = client.get_metric("price_close", "dateindex", -10, None, None, "csv")
print(a)
def test_fetch_typed_metric():
client = BrkClient("http://localhost:3110")
a = client.metrics.constants.constant_0.by.dateindex().range(-10)
a = client.metrics.constants.constant_0.by.dateindex().from_(-10).json()
print(a)
b = client.metrics.outputs.count.utxo_count.by.height().range(-10)
b = client.metrics.outputs.count.utxo_count.by.height().from_(-10).json()
print(b)
c = client.metrics.price.usd.split.close.by.dateindex().range(-10)
c = client.metrics.price.usd.split.close.by.dateindex().from_(-10).json()
print(c)
d = client.metrics.market.dca.period_lump_sum_stack._10y.dollars.by.dateindex().range(
-10
d = (
client.metrics.market.dca.period_lump_sum_stack._10y.dollars.by.dateindex()
.from_(-10)
.json()
)
print(d)
e = client.metrics.market.dca.class_average_price._2017.by.dateindex().range(-10)
e = (
client.metrics.market.dca.class_average_price._2017.by.dateindex()
.from_(-10)
.json()
)
print(e)
f = client.metrics.distribution.address_cohorts.amount_range._10k_sats_to_100k_sats.activity.sent.dollars.cumulative.by.dateindex().range(
-10
f = (
client.metrics.distribution.address_cohorts.amount_range._10k_sats_to_100k_sats.activity.sent.dollars.cumulative.by.dateindex()
.from_(-10)
.json()
)
print(f)
g = client.metrics.price.usd.ohlc.by.dateindex().range(-10)
g = client.metrics.price.usd.ohlc.by.dateindex().from_(-10).json()
print(g)