Skip to main content

Crate brk_client

Crate brk_client 

Source

Structs§

AbsoluteRatePattern
Pattern struct for repeated tree structure.
AbsoluteRatePattern2
Pattern struct for repeated tree structure.
ActivityAddrOutputsRealizedSupplyUnrealizedPattern
Pattern struct for repeated tree structure.
ActivityOutputsRealizedSupplyUnrealizedPattern
Pattern struct for repeated tree structure.
ActivityOutputsRealizedSupplyUnrealizedPattern2
Pattern struct for repeated tree structure.
ActivityOutputsRealizedSupplyUnrealizedPattern3
Pattern struct for repeated tree structure.
Addr
Bitcoin address string
AddrChainStats
Address statistics on the blockchain (confirmed transactions only)
AddrGroups
AddrHash
AddrIndexOutPoint
AddrIndexTxIndex
AddrMempoolStats
Address statistics in the mempool (unconfirmed transactions only)
AddrParam
AddrStats
Address information compatible with mempool.space API format
AddrTxidsParam
AddrValidation
Address validation result
AdjustedRatioValuePattern
Pattern struct for repeated tree structure.
Age
Represents the age of a UTXO or address balance. Encapsulates all age-related calculations in one type-safe struct.
AgeRange
AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3
Pattern struct for repeated tree structure.
AllSthPattern
Pattern struct for repeated tree structure.
AllSthPattern2
Pattern struct for repeated tree structure.
AmountBucket
Bucket index for amount ranges. Use for cheap comparisons and direct lookups.
AmountRange
AnyAddrIndex
Unified index for any address type (funded or empty)
AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern
Pattern struct for repeated tree structure.
AverageBlockCumulativeInSumPattern
Pattern struct for repeated tree structure.
AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern
Pattern struct for repeated tree structure.
AverageBlockCumulativeSumPattern
Pattern struct for repeated tree structure.
AverageBlockCumulativeSumPattern2
Pattern struct for repeated tree structure.
AverageBlockCumulativeSumPattern3
Pattern struct for repeated tree structure.
AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern
Pattern struct for repeated tree structure.
BaseDeltaPattern
Pattern struct for repeated tree structure.
BaseSumPattern
Pattern struct for repeated tree structure.
BasisPoints16
Unsigned basis points stored as u16. 1 bp = 0.0001. Range: 0–6.5535. Use for bounded 0–1 ratios (dominance, adoption, liveliness, etc.). u16::MAX is reserved as a NaN sentinel.
BasisPoints32
Unsigned basis points stored as u32. 1 bp = 0.0001. Range: 0–429,496.7295. Use for unbounded unsigned ratios (MVRV, NVT, SOPR, etc.). u32::MAX is reserved as a NaN sentinel.
BasisPointsSigned16
Signed basis points stored as i16. 1 bp = 0.0001. Range: -3.2767 to +3.2767. Use for signed bounded ratios (NUPL, net PnL ratios, etc.). i16::MIN is reserved as a NaN sentinel.
BasisPointsSigned32
Signed basis points stored as i32. 1 bp = 0.0001. Range: -214,748.3647 to +214,748.3647. Use for unbounded signed values (returns, growth rates, volatility, z-scores, etc.). i32::MIN is reserved as a NaN sentinel.
Bitcoin
Bitcoin amount as floating point (1 BTC = 100,000,000 satoshis)
BlkMetadata
BlkPosition
Position within a .blk file, encoding file index and byte offset
Block
BlockChangeCumulativeDeltaSumPattern
Pattern struct for repeated tree structure.
BlockCountParam
BlockCumulativeDeltaSumPattern
Pattern struct for repeated tree structure.
BlockCumulativeNegativeSumPattern
Pattern struct for repeated tree structure.
BlockCumulativePattern
Pattern struct for repeated tree structure.
BlockCumulativeSumPattern
Pattern struct for repeated tree structure.
BlockFeeRatesEntry
A single block fee rates data point with percentiles.
BlockFeesEntry
A single block fees data point.
BlockHash
Block hash
BlockHashParam
BlockHashPrefix
BlockHashStartIndex
BlockHashTxIndex
BlockInfo
Block information returned by the API
BlockRewardsEntry
A single block rewards data point.
BlockSizeEntry
A single block size data point.
BlockSizesWeights
Combined block sizes and weights response.
BlockStatus
Block status indicating whether block is in the best chain
BlockTimestamp
Block information returned for timestamp queries
BlockWeightEntry
A single block weight data point.
BlocksDominancePattern
Pattern struct for repeated tree structure.
BlocksDominanceRewardsPattern
Pattern struct for repeated tree structure.
BothReactivatedReceivingSendingPattern
Pattern struct for repeated tree structure.
BpsCentsPercentilesRatioSatsSmaStdUsdPattern
Pattern struct for repeated tree structure.
BpsCentsPercentilesRatioSatsUsdPattern
Pattern struct for repeated tree structure.
BpsCentsRatioSatsUsdPattern
Pattern struct for repeated tree structure.
BpsPercentRatioPattern
Pattern struct for repeated tree structure.
BpsPercentRatioPattern3
Pattern struct for repeated tree structure.
BpsPercentRatioPattern4
Pattern struct for repeated tree structure.
BpsPercentRatioPattern5
Pattern struct for repeated tree structure.
BpsPriceRatioPattern
Pattern struct for repeated tree structure.
BpsRatioPattern
Pattern struct for repeated tree structure.
BpsRatioPattern2
Pattern struct for repeated tree structure.
BrkClient
Main BRK client with series tree and API methods.
BrkClientBase
Base HTTP client for making requests. Reuses connections via ureq::Agent.
BrkClientOptions
Options for configuring the BRK client.
BrkError
Error type for BRK client operations.
BtcCentsDeltaSatsUsdPattern
Pattern struct for repeated tree structure.
BtcCentsSatsToUsdPattern
Pattern struct for repeated tree structure.
BtcCentsSatsToUsdPattern2
Pattern struct for repeated tree structure.
BtcCentsSatsToUsdPattern3
Pattern struct for repeated tree structure.
BtcCentsSatsUsdPattern
Pattern struct for repeated tree structure.
BtcCentsSatsUsdPattern2
Pattern struct for repeated tree structure.
BtcCentsSatsUsdPattern3
Pattern struct for repeated tree structure.
ByAddrType
ByAnyAddr
ByEpoch
ByTerm
ByType
CapGrossInvestorLossMvrvNetPeakPriceProfitSellSoprPattern
Pattern struct for repeated tree structure.
CapLossMvrvNetPriceProfitSoprPattern
Pattern struct for repeated tree structure.
CapLossMvrvPriceProfitPattern
Pattern struct for repeated tree structure.
Cents
Unsigned cents (u64) - for values that should never be negative. Used for invested capital, realized cap, etc.
CentsCompact
Compact unsigned cents (u32) - memory-efficient for map keys. Supports values from $0.00 to $42,949,672.95 (u32::MAX / 100).
CentsDeltaToUsdPattern
Pattern struct for repeated tree structure.
CentsDeltaUsdPattern
Pattern struct for repeated tree structure.
CentsNegativeToUsdPattern2
Pattern struct for repeated tree structure.
CentsNegativeUsdPattern
Pattern struct for repeated tree structure.
CentsSats
Cents × Sats (u128) - price in cents multiplied by amount in sats. Uses u128 because large amounts at any price can overflow u64.
CentsSatsUsdPattern
Pattern struct for repeated tree structure.
CentsSatsUsdPattern3
Pattern struct for repeated tree structure.
CentsSigned
Signed cents (i64) - for values that can be negative. Used for profit/loss calculations, deltas, etc.
CentsSquaredSats
Raw cents squared (u128) - stores cents² × sats without division. Used for precise accumulation of investor cap values: Σ(price² × sats). investor_price = investor_cap_raw / realized_cap_raw
CentsToUsdPattern3
Pattern struct for repeated tree structure.
CentsToUsdPattern4
Pattern struct for repeated tree structure.
CentsUsdPattern
Pattern struct for repeated tree structure.
CentsUsdPattern2
Pattern struct for repeated tree structure.
CentsUsdPattern3
Pattern struct for repeated tree structure.
CentsUsdPattern4
Pattern struct for repeated tree structure.
Class
Close
Closing price value for a time period
Cohort
Cohort identifier for cost basis distribution.
CohortName
Display names for a cohort with id (for storage/API), short (for charts), and long (for tooltips/labels)
CoindaysCoinyearsDormancyTransferPattern
Pattern struct for repeated tree structure.
CoindaysTransferPattern
Pattern struct for repeated tree structure.
CostBasisCohortParam
Path parameters for cost basis dates endpoint.
CostBasisDistribution
Cost basis distribution: a map of price (cents) to sats.
CostBasisParams
Path parameters for cost basis distribution endpoint.
CostBasisQuery
Query parameters for cost basis distribution endpoint.
CostBasisSnapshot
Snapshot of cost basis related state. Uses CentsSats (u64) for single-UTXO values, CentsSquaredSats (u128) for investor cap.
CumulativeRollingSumPattern
Pattern struct for repeated tree structure.
DataRange
Range parameters for slicing data
DataRangeFormat
Data range with output format for API query parameters
Date
Date in YYYYMMDD format stored as u32
DateSeriesData
Series data that is guaranteed to use a date-based index.
Day1
Day3
DeltaHalfInToTotalPattern
Pattern struct for repeated tree structure.
DeltaHalfInToTotalPattern2
Pattern struct for repeated tree structure.
DeltaHalfInTotalPattern2
Pattern struct for repeated tree structure.
DeltaTotalPattern
Pattern struct for repeated tree structure.
DetailedSeriesCount
Detailed series count with per-database breakdown
DifficultyAdjustment
Difficulty adjustment information.
DifficultyAdjustmentEntry
A single difficulty adjustment entry. Serializes as array: [timestamp, height, difficulty, change_percent]
DifficultyEntry
A single difficulty data point.
DiskUsage
Disk usage of the indexed data
Dollars
US Dollar amount as floating point
EmaHistogramLineSignalPattern
Pattern struct for repeated tree structure.
EmptyAddrData
Data of an empty address
EmptyAddrIndex
EmptyOutputIndex
Epoch
Etag
HTTP ETag value.
Exit
Graceful shutdown coordinator for ensuring data consistency during program exit.
FeeRate
Fee rate in sats/vB
FeeRatePercentiles
Fee rate percentiles (min, 10%, 25%, 50%, 75%, 90%, max).
FundedAddrData
Data for a funded (non-empty) address with current balance
FundedAddrIndex
GreedNetPainPattern
Pattern struct for repeated tree structure.
GrossInvestedInvestorLossNetNuplProfitSentimentPattern2
Pattern struct for repeated tree structure.
Halving
HashrateEntry
A single hashrate data point.
HashrateSummary
Summary of network hashrate and difficulty data.
Health
Server health status
Height
Block height
HeightParam
Hex
Hex-encoded string
High
Highest price value for a time period
Hour1
Hour4
Hour12
InMaxMinPerSupplyPattern
Pattern struct for repeated tree structure.
InPattern
Pattern struct for repeated tree structure.
IndexInfo
Information about an available index and its query aliases
Indexes
Blockchain-level indexes tracking current positions for various entity types. Used by brk_indexer during block processing.
Limit
Maximum number of results to return. Defaults to 100 if not specified.
LimitParam
Loss
9 “at least X% loss” aggregate thresholds.
LossNetNuplProfitPattern
Pattern struct for repeated tree structure.
LossNuplProfitPattern
Pattern struct for repeated tree structure.
Low
Lowest price value for a time period
MaxMedianMinPct10Pct25Pct75Pct90Pattern
Pattern struct for repeated tree structure.
MaxMedianMinPct10Pct25Pct75Pct90Pattern2
Pattern struct for repeated tree structure.
MempoolBlock
Block info in a mempool.space like format for fee estimation.
MempoolEntryInfo
Mempool entry info from Bitcoin Core’s getrawmempool verbose
MempoolInfo
Mempool statistics
Minute10
Minute30
Month1
Month3
Month6
NuplPattern
Pattern struct for repeated tree structure.
NuplRealizedSupplyUnrealizedPattern
Pattern struct for repeated tree structure.
OHLCCents
OHLC (Open, High, Low, Close) data in cents
OHLCDollars
OHLC (Open, High, Low, Close) data in dollars
OHLCSats
OHLC (Open, High, Low, Close) data in satoshis
OpReturnIndex
Open
Opening price value for a time period
OracleBins
Phase histogram: counts per bin for frac(log10(sats))
OracleBinsV2
V2 Phase histogram: counts per bin for frac(log10(sats))
OutPoint
OverAge
OverAmount
P2AAddrIndex
P2ABytes
P2MSOutputIndex
P2PK33AddrIndex
P2PK33Bytes
P2PK65AddrIndex
P2PK65Bytes
P2PKHAddrIndex
P2PKHBytes
P2SHAddrIndex
P2SHBytes
P2TRAddrIndex
P2TRBytes
P2WPKHAddrIndex
P2WPKHBytes
P2WSHAddrIndex
P2WSHBytes
PaginatedSeries
A paginated list of available series names (1000 per page)
Pagination
Pagination parameters for paginated API endpoints
PaginationIndex
Pagination parameters with an index filter
Pct0Pct1Pct2Pct5Pct95Pct98Pct99Pattern
Pattern struct for repeated tree structure.
Pct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65Pct70Pct75Pct80Pct85Pct90Pct95Pattern
Pattern struct for repeated tree structure.
PerPattern
Pattern struct for repeated tree structure.
PhsReboundThsPattern
Pattern struct for repeated tree structure.
Pool
Mining pool information
PoolBlockCounts
Block counts for different time periods
PoolBlockShares
Pool’s share of total blocks for different time periods
PoolDetail
Detailed pool information with statistics across time periods
PoolDetailInfo
Pool information for detail view
PoolInfo
Basic pool information for listing all pools
PoolSlugParam
PoolStats
Mining pool with block statistics for a time period
Pools
PoolsSummary
Mining pools response for a time period
Port
Server port. Defaults to 3110.
PricePattern
Pattern struct for repeated tree structure.
PriceRatioPattern
Pattern struct for repeated tree structure.
Profit
14 “at least X% profit” aggregate thresholds.
ProfitabilityRange
25 profitability range buckets ordered from most profitable to most in loss.
RangeBuilder
Builder with range fully specified.
RangeMap
Maps ranges of indices to values for efficient reverse lookups.
RatioTransferValuePattern
Pattern struct for repeated tree structure.
RatioValuePattern
Pattern struct for repeated tree structure.
RawLockTime
Transaction locktime
ReadBlock
RecommendedFees
Recommended fee rates in sat/vB
RewardStats
Block reward statistics over a range of blocks
RsiStochPattern
Pattern struct for repeated tree structure.
Sats
Satoshis
SatsFract
Fractional satoshis (f64) - for representing USD prices in sats
SatsSigned
Signed satoshis (i64) - for values that can be negative. Used for changes, deltas, profit/loss calculations, etc.
SdSmaPattern
Pattern struct for repeated tree structure.
SearchQuery
SeriesCount
Series count statistics - distinct series and total series-index combinations
SeriesData
Series data with range information.
SeriesEndpoint
Builder for series endpoint queries.
SeriesInfo
Metadata about a series
SeriesLeaf
Leaf node containing series metadata
SeriesLeafWithSchema
SeriesLeaf with JSON Schema for client generation
SeriesList
Comma-separated list of series names
SeriesName
Series name
SeriesNameWithIndex
SeriesOutput
Series output with metadata for caching.
SeriesOutputLegacy
Deprecated: Legacy series output with metadata for caching.
SeriesParam
SeriesPattern1
SeriesPattern2
SeriesPattern3
SeriesPattern4
SeriesPattern5
SeriesPattern6
SeriesPattern7
SeriesPattern8
SeriesPattern9
SeriesPattern1By
SeriesPattern2By
SeriesPattern3By
SeriesPattern4By
SeriesPattern5By
SeriesPattern6By
SeriesPattern7By
SeriesPattern8By
SeriesPattern9By
SeriesPattern10
SeriesPattern11
SeriesPattern12
SeriesPattern13
SeriesPattern14
SeriesPattern15
SeriesPattern16
SeriesPattern17
SeriesPattern18
SeriesPattern19
SeriesPattern20
SeriesPattern21
SeriesPattern22
SeriesPattern23
SeriesPattern24
SeriesPattern25
SeriesPattern26
SeriesPattern27
SeriesPattern28
SeriesPattern29
SeriesPattern30
SeriesPattern31
SeriesPattern32
SeriesPattern33
SeriesPattern34
SeriesPattern35
SeriesPattern10By
SeriesPattern11By
SeriesPattern12By
SeriesPattern13By
SeriesPattern14By
SeriesPattern15By
SeriesPattern16By
SeriesPattern17By
SeriesPattern18By
SeriesPattern19By
SeriesPattern20By
SeriesPattern21By
SeriesPattern22By
SeriesPattern23By
SeriesPattern24By
SeriesPattern25By
SeriesPattern26By
SeriesPattern27By
SeriesPattern28By
SeriesPattern29By
SeriesPattern30By
SeriesPattern31By
SeriesPattern32By
SeriesPattern33By
SeriesPattern34By
SeriesPattern35By
SeriesSelection
Selection of series to query
SeriesSelectionLegacy
Legacy series selection parameters (deprecated)
SeriesTree
Series tree node.
SeriesTree_Addrs
Series tree node.
SeriesTree_Addrs_Activity
Series tree node.
SeriesTree_Addrs_Data
Series tree node.
SeriesTree_Addrs_Delta
Series tree node.
SeriesTree_Addrs_Indexes
Series tree node.
SeriesTree_Addrs_New
Series tree node.
SeriesTree_Addrs_Raw
Series tree node.
SeriesTree_Addrs_Raw_P2a
Series tree node.
SeriesTree_Addrs_Raw_P2pk33
Series tree node.
SeriesTree_Addrs_Raw_P2pk65
Series tree node.
SeriesTree_Addrs_Raw_P2pkh
Series tree node.
SeriesTree_Addrs_Raw_P2sh
Series tree node.
SeriesTree_Addrs_Raw_P2tr
Series tree node.
SeriesTree_Addrs_Raw_P2wpkh
Series tree node.
SeriesTree_Addrs_Raw_P2wsh
Series tree node.
SeriesTree_Blocks
Series tree node.
SeriesTree_Blocks_Count
Series tree node.
SeriesTree_Blocks_Difficulty
Series tree node.
SeriesTree_Blocks_Fullness
Series tree node.
SeriesTree_Blocks_Halving
Series tree node.
SeriesTree_Blocks_Interval
Series tree node.
SeriesTree_Blocks_Lookback
Series tree node.
SeriesTree_Blocks_Size
Series tree node.
SeriesTree_Blocks_Time
Series tree node.
SeriesTree_Cohorts
Series tree node.
SeriesTree_Cohorts_Addr
Series tree node.
SeriesTree_Cohorts_Addr_AmountRange
Series tree node.
SeriesTree_Cohorts_Addr_OverAmount
Series tree node.
SeriesTree_Cohorts_Addr_UnderAmount
Series tree node.
SeriesTree_Cohorts_Utxo
Series tree node.
SeriesTree_Cohorts_Utxo_AgeRange
Series tree node.
SeriesTree_Cohorts_Utxo_All
Series tree node.
SeriesTree_Cohorts_Utxo_All_Activity
Series tree node.
SeriesTree_Cohorts_Utxo_All_CostBasis
Series tree node.
SeriesTree_Cohorts_Utxo_All_Outputs
Series tree node.
SeriesTree_Cohorts_Utxo_All_Realized
Series tree node.
SeriesTree_Cohorts_Utxo_All_Realized_Price
Series tree node.
SeriesTree_Cohorts_Utxo_All_Realized_Price_StdDev
Series tree node.
SeriesTree_Cohorts_Utxo_All_Realized_Price_StdDev_1y
Series tree node.
SeriesTree_Cohorts_Utxo_All_Realized_Price_StdDev_2y
Series tree node.
SeriesTree_Cohorts_Utxo_All_Realized_Price_StdDev_4y
Series tree node.
SeriesTree_Cohorts_Utxo_All_Realized_Price_StdDev_All
Series tree node.
SeriesTree_Cohorts_Utxo_All_Realized_Sopr
Series tree node.
SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted
Series tree node.
SeriesTree_Cohorts_Utxo_All_Supply
Series tree node.
SeriesTree_Cohorts_Utxo_All_Unrealized
Series tree node.
SeriesTree_Cohorts_Utxo_All_Unrealized_Loss
Series tree node.
SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl
Series tree node.
SeriesTree_Cohorts_Utxo_All_Unrealized_Profit
Series tree node.
SeriesTree_Cohorts_Utxo_All_Unrealized_Sentiment
Series tree node.
SeriesTree_Cohorts_Utxo_AmountRange
Series tree node.
SeriesTree_Cohorts_Utxo_Class
Series tree node.
SeriesTree_Cohorts_Utxo_Epoch
Series tree node.
SeriesTree_Cohorts_Utxo_Lth
Series tree node.
SeriesTree_Cohorts_Utxo_Lth_Realized
Series tree node.
SeriesTree_Cohorts_Utxo_Lth_Realized_Price
Series tree node.
SeriesTree_Cohorts_Utxo_Lth_Realized_Price_StdDev
Series tree node.
SeriesTree_Cohorts_Utxo_Lth_Realized_Price_StdDev_1y
Series tree node.
SeriesTree_Cohorts_Utxo_Lth_Realized_Price_StdDev_2y
Series tree node.
SeriesTree_Cohorts_Utxo_Lth_Realized_Price_StdDev_4y
Series tree node.
SeriesTree_Cohorts_Utxo_Lth_Realized_Price_StdDev_All
Series tree node.
SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr
Series tree node.
SeriesTree_Cohorts_Utxo_Matured
Series tree node.
SeriesTree_Cohorts_Utxo_OverAge
Series tree node.
SeriesTree_Cohorts_Utxo_OverAmount
Series tree node.
SeriesTree_Cohorts_Utxo_Profitability
Series tree node.
SeriesTree_Cohorts_Utxo_Profitability_Loss
Series tree node.
SeriesTree_Cohorts_Utxo_Profitability_Profit
Series tree node.
SeriesTree_Cohorts_Utxo_Profitability_Range
Series tree node.
SeriesTree_Cohorts_Utxo_Sth
Series tree node.
SeriesTree_Cohorts_Utxo_Sth_Realized
Series tree node.
SeriesTree_Cohorts_Utxo_Sth_Realized_Price
Series tree node.
SeriesTree_Cohorts_Utxo_Sth_Realized_Price_StdDev
Series tree node.
SeriesTree_Cohorts_Utxo_Sth_Realized_Price_StdDev_1y
Series tree node.
SeriesTree_Cohorts_Utxo_Sth_Realized_Price_StdDev_2y
Series tree node.
SeriesTree_Cohorts_Utxo_Sth_Realized_Price_StdDev_4y
Series tree node.
SeriesTree_Cohorts_Utxo_Sth_Realized_Price_StdDev_All
Series tree node.
SeriesTree_Cohorts_Utxo_Type
Series tree node.
SeriesTree_Cohorts_Utxo_UnderAge
Series tree node.
SeriesTree_Cohorts_Utxo_UnderAmount
Series tree node.
SeriesTree_Cointime
Series tree node.
SeriesTree_Cointime_Activity
Series tree node.
SeriesTree_Cointime_Adjusted
Series tree node.
SeriesTree_Cointime_Cap
Series tree node.
SeriesTree_Cointime_Prices
Series tree node.
SeriesTree_Cointime_ReserveRisk
Series tree node.
SeriesTree_Cointime_Supply
Series tree node.
SeriesTree_Cointime_Value
Series tree node.
SeriesTree_Constants
Series tree node.
SeriesTree_Indexes
Series tree node.
SeriesTree_Indexes_Addr
Series tree node.
SeriesTree_Indexes_Addr_Empty
Series tree node.
SeriesTree_Indexes_Addr_OpReturn
Series tree node.
SeriesTree_Indexes_Addr_P2a
Series tree node.
SeriesTree_Indexes_Addr_P2ms
Series tree node.
SeriesTree_Indexes_Addr_P2pk33
Series tree node.
SeriesTree_Indexes_Addr_P2pk65
Series tree node.
SeriesTree_Indexes_Addr_P2pkh
Series tree node.
SeriesTree_Indexes_Addr_P2sh
Series tree node.
SeriesTree_Indexes_Addr_P2tr
Series tree node.
SeriesTree_Indexes_Addr_P2wpkh
Series tree node.
SeriesTree_Indexes_Addr_P2wsh
Series tree node.
SeriesTree_Indexes_Addr_Unknown
Series tree node.
SeriesTree_Indexes_Day1
Series tree node.
SeriesTree_Indexes_Day3
Series tree node.
SeriesTree_Indexes_Epoch
Series tree node.
SeriesTree_Indexes_Halving
Series tree node.
SeriesTree_Indexes_Height
Series tree node.
SeriesTree_Indexes_Hour1
Series tree node.
SeriesTree_Indexes_Hour4
Series tree node.
SeriesTree_Indexes_Hour12
Series tree node.
SeriesTree_Indexes_Minute10
Series tree node.
SeriesTree_Indexes_Minute30
Series tree node.
SeriesTree_Indexes_Month1
Series tree node.
SeriesTree_Indexes_Month3
Series tree node.
SeriesTree_Indexes_Month6
Series tree node.
SeriesTree_Indexes_Timestamp
Series tree node.
SeriesTree_Indexes_TxIndex
Series tree node.
SeriesTree_Indexes_TxinIndex
Series tree node.
SeriesTree_Indexes_TxoutIndex
Series tree node.
SeriesTree_Indexes_Week1
Series tree node.
SeriesTree_Indexes_Year1
Series tree node.
SeriesTree_Indexes_Year10
Series tree node.
SeriesTree_Indicators
Series tree node.
SeriesTree_Indicators_Dormancy
Series tree node.
SeriesTree_Indicators_RealizedEnvelope
Series tree node.
SeriesTree_Inputs
Series tree node.
SeriesTree_Inputs_Raw
Series tree node.
SeriesTree_Inputs_Spent
Series tree node.
SeriesTree_Investing
Series tree node.
SeriesTree_Investing_Class
Series tree node.
SeriesTree_Investing_Class_DcaCostBasis
Series tree node.
SeriesTree_Investing_Class_DcaReturn
Series tree node.
SeriesTree_Investing_Class_DcaStack
Series tree node.
SeriesTree_Investing_Period
Series tree node.
SeriesTree_Investing_Period_DcaCostBasis
Series tree node.
SeriesTree_Market
Series tree node.
SeriesTree_Market_Ath
Series tree node.
SeriesTree_Market_Lookback
Series tree node.
SeriesTree_Market_MovingAverage
Series tree node.
SeriesTree_Market_MovingAverage_Ema
Series tree node.
SeriesTree_Market_MovingAverage_Sma
Series tree node.
SeriesTree_Market_MovingAverage_Sma_200d
Series tree node.
SeriesTree_Market_MovingAverage_Sma_350d
Series tree node.
SeriesTree_Market_Range
Series tree node.
SeriesTree_Market_Returns
Series tree node.
SeriesTree_Market_Returns_Periods
Series tree node.
SeriesTree_Market_Returns_Sd24h
Series tree node.
SeriesTree_Market_Returns_Sd24h_1m
Series tree node.
SeriesTree_Market_Returns_Sd24h_1w
Series tree node.
SeriesTree_Market_Returns_Sd24h_1y
Series tree node.
SeriesTree_Market_Returns_Sd24h_24h
Series tree node.
SeriesTree_Market_Technical
Series tree node.
SeriesTree_Market_Technical_Macd
Series tree node.
SeriesTree_Market_Technical_Macd_1m
Series tree node.
SeriesTree_Market_Technical_Macd_1w
Series tree node.
SeriesTree_Market_Technical_Macd_24h
Series tree node.
SeriesTree_Market_Technical_Rsi
Series tree node.
SeriesTree_Mining
Series tree node.
SeriesTree_Mining_Hashrate
Series tree node.
SeriesTree_Mining_Hashrate_Rate
Series tree node.
SeriesTree_Mining_Hashrate_Rate_Sma
Series tree node.
SeriesTree_Mining_Rewards
Series tree node.
SeriesTree_Mining_Rewards_Fees
Series tree node.
SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio
Series tree node.
SeriesTree_Mining_Rewards_Subsidy
Series tree node.
SeriesTree_Outputs
Series tree node.
SeriesTree_Outputs_Count
Series tree node.
SeriesTree_Outputs_Raw
Series tree node.
SeriesTree_Outputs_Spent
Series tree node.
SeriesTree_Pools
Series tree node.
SeriesTree_Pools_Major
Series tree node.
SeriesTree_Pools_Minor
Series tree node.
SeriesTree_Positions
Series tree node.
SeriesTree_Prices
Series tree node.
SeriesTree_Prices_Ohlc
Series tree node.
SeriesTree_Prices_Split
Series tree node.
SeriesTree_Prices_Spot
Series tree node.
SeriesTree_Scripts
Series tree node.
SeriesTree_Scripts_Count
Series tree node.
SeriesTree_Scripts_Raw
Series tree node.
SeriesTree_Scripts_Raw_Empty
Series tree node.
SeriesTree_Scripts_Raw_OpReturn
Series tree node.
SeriesTree_Scripts_Raw_P2ms
Series tree node.
SeriesTree_Scripts_Raw_Unknown
Series tree node.
SeriesTree_Scripts_Value
Series tree node.
SeriesTree_Supply
Series tree node.
SeriesTree_Supply_Velocity
Series tree node.
SeriesTree_Transactions
Series tree node.
SeriesTree_Transactions_Count
Series tree node.
SeriesTree_Transactions_Fees
Series tree node.
SeriesTree_Transactions_Raw
Series tree node.
SeriesTree_Transactions_Size
Series tree node.
SeriesTree_Transactions_Size_Weight
Series tree node.
SeriesTree_Transactions_Versions
Series tree node.
SeriesTree_Transactions_Volume
Series tree node.
SingleItemBuilder
Builder for single item access.
SkippedBuilder
Builder after calling skip(n). Chain with take(n) to specify count.
SpendableType
SpendingSpentUnspentPattern
Pattern struct for repeated tree structure.
StoredBool
Fixed-size boolean value optimized for on-disk storage (stored as u8)
StoredF32
Stored 32-bit floating point value
StoredF64
Fixed-size 64-bit floating point value optimized for on-disk storage
StoredI8
StoredI16
StoredI64
Fixed-size 64-bit signed integer optimized for on-disk storage
StoredString
StoredU8
StoredU16
StoredU32
Fixed-size 32-bit unsigned integer optimized for on-disk storage
StoredU64
Fixed-size 64-bit unsigned integer optimized for on-disk storage
SupplyState
Current supply state tracking UTXO count and total value
SyncStatus
Sync status of the indexer
TimePeriodParam
Timestamp
UNIX timestamp in seconds
TimestampParam
ToPattern
Pattern struct for repeated tree structure.
Transaction
Transaction information compatible with mempool.space API format
TransferPattern
Pattern struct for repeated tree structure.
TxIn
Transaction input
TxInIndex
TxIndex
TxOut
Transaction output
TxOutIndex
TxOutspend
Status of an output indicating whether it has been spent
TxStatus
Transaction confirmation status
TxVersion
Transaction version number
TxWithHex
A transaction with its raw hex representation
Txid
Transaction ID (hash)
TxidParam
TxidPrefix
TxidVout
Transaction output reference (txid + output index)
TypeIndex
Index within its type (e.g., 0 for first P2WPKH address)
U8x2
U8x20
U8x32
U8x33
U8x65
UTXOGroups
UnderAge
UnderAmount
Unit
UnknownOutputIndex
UnspendableType
Utxo
Unspent transaction output
VSize
Virtual size in vbytes (weight / 4, rounded up)
ValidateAddrParam
Version
Version tracking for data schema and computed values.
Vin
Input index in the spending transaction
Vout
Index of the output being spent in the previous transaction
Week1
Weight
Transaction or block weight in weight units (WU)
Year
Bitcoin year (2009, 2010, …, 2025+)
Year1
Year10
_0sdM0M1M1sdM2M2sdM3sdP0P1P1sdP2P2sdP3sdSdZscorePattern
Pattern struct for repeated tree structure.
_1m1w1y2wPattern
Pattern struct for repeated tree structure.
_1m1w1y2y4yAllPattern
Pattern struct for repeated tree structure.
_1m1w1y24hBlockPattern
Pattern struct for repeated tree structure.
_1m1w1y24hBpsPercentRatioPattern
Pattern struct for repeated tree structure.
_1m1w1y24hPattern
Pattern struct for repeated tree structure.
_1m1w1y24hPattern2
Pattern struct for repeated tree structure.
_1m1w1y24hPattern3
Pattern struct for repeated tree structure.
_1m1w1y24hPattern4
Pattern struct for repeated tree structure.
_1m1w1y24hPattern5
Pattern struct for repeated tree structure.
_1m1w1y24hPattern6
Pattern struct for repeated tree structure.
_1m1w1y24hPattern7
Pattern struct for repeated tree structure.
_1y2y4yAllPattern
Pattern struct for repeated tree structure.
_6bBlockTxPattern
Pattern struct for repeated tree structure.
_10y1m1w1y2y3m3y4y5y6m6y8yPattern2
Pattern struct for repeated tree structure.
_10y1m1w1y2y3m3y4y5y6m6y8yPattern3
Pattern struct for repeated tree structure.
_10y2y3y4y5y6y8yPattern
Pattern struct for repeated tree structure.
_24hPattern
Pattern struct for repeated tree structure.

Enums§

AddrBytes
AmountFilter
AnyAddrDataIndexEnum
CohortContext
Context for cohort naming - determines whether a prefix is needed.
CostBasisBucket
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).
CostBasisValue
Value type for cost basis distribution. Options: supply (BTC), realized (USD, price × supply), unrealized (USD, spot × supply).
Filter
Format
Output format for API responses
FormatResponse
Response type for endpoints that support multiple formats (JSON/CSV).
Index
Aggregation dimension for querying series. Includes time-based (date, week, month, year), block-based (height, tx_index), and address/output type indexes.
LegacyValue
Deprecated: Raw JSON without metadata wrapper.
Output
Series data output format
OutputLegacy
Deprecated: Raw JSON without metadata wrapper
OutputType
Type (P2PKH, P2WPKH, P2SH, P2TR, etc.)
PoolSlug
RangeIndex
A range boundary: integer index, date, or timestamp.
StateLevel
Controls the level of state tracking for a cohort.
Term
Classification for short-term vs long-term holders. The threshold is 150 days (approximately 5 months) = 3600 hours.
TimeFilter
TimePeriod
Time period for mining statistics.
TreeNode
Hierarchical tree node for organizing series into categories

Constants§

AGE_BOUNDARIES
Age boundaries in hours. Defines the cohort ranges: [0, 1h), [1h, 1d), [1d, 1w), [1w, 1m), …, [15y, ∞)
AGE_RANGE_BOUNDS
Age range bounds (end = usize::MAX means unbounded)
AGE_RANGE_FILTERS
Age range filters
AGE_RANGE_NAMES
Age range names
AMOUNT_RANGE_BOUNDS
Amount range bounds
AMOUNT_RANGE_FILTERS
Amount range filters
AMOUNT_RANGE_NAMES
Amount range names
BLOCKS_PER_DIFF_EPOCHS
BLOCKS_PER_HALVING
CLASS_FILTERS
Class filters
CLASS_NAMES
Class names
CLASS_VALUES
Class values
DAY3_INTERVAL
EPOCH_FILTERS
Epoch filters
EPOCH_NAMES
Epoch names
EPOCH_VALUES
Epoch values
HOUR1_INTERVAL
HOUR4_INTERVAL
HOUR12_INTERVAL
HOURS_1D
HOURS_1H
HOURS_1M
HOURS_1W
HOURS_1Y
HOURS_2M
HOURS_2Y
HOURS_3M
HOURS_3Y
HOURS_4M
HOURS_4Y
HOURS_5M
HOURS_5Y
HOURS_6M
HOURS_6Y
HOURS_7Y
HOURS_8Y
HOURS_10Y
HOURS_12Y
HOURS_15Y
INDEX_EPOCH
2009-01-01 00:00:00 UTC — epoch for fixed-interval time indexes.
LOSS_COUNT
Number of loss thresholds.
LOSS_NAMES
“At least X% loss” threshold names (9 thresholds).
MINUTE10_INTERVAL
MINUTE30_INTERVAL
ONE_DAY_IN_SEC
ONE_DAY_IN_SEC_F64
ONE_HOUR_IN_SEC
OVER_AGE_FILTERS
Over-age filters (GreaterOrEqual threshold in hours)
OVER_AGE_HOURS
Over-age thresholds in hours
OVER_AGE_NAMES
Over-age names
OVER_AMOUNT_FILTERS
Over-amount filters
OVER_AMOUNT_NAMES
Over-amount names
OVER_AMOUNT_THRESHOLDS
Over-amount thresholds
P2A
P2PK33
P2PK65
P2PKH
P2SH
P2TR
P2WPKH
P2WSH
PERCENTILES
Standard percentile values used throughout BRK.
PERCENTILES_LEN
Length of the PERCENTILES array.
PHASE_BINS
Number of bins for the phase histogram
PHASE_BINS_V2
Number of bins for V2 phase histogram (0.5% resolution)
PROFITABILITY_BOUNDARY_COUNT
Number of profitability range boundaries (24 boundaries → 25 buckets).
PROFITABILITY_RANGE_COUNT
Number of profitability range buckets.
PROFITABILITY_RANGE_NAMES
Profitability range names (25 ranges, from most profitable to most in loss)
PROFIT_COUNT
Number of profit thresholds.
PROFIT_NAMES
“At least X% profit” threshold names (14 thresholds).
SPENDABLE_TYPE_FILTERS
Spendable type filters
SPENDABLE_TYPE_NAMES
Spendable type names
SPENDABLE_TYPE_VALUES
Spendable type values
TERM_FILTERS
Term filters
TERM_NAMES
Term names
TERM_VALUES
Term values
UNDER_AGE_FILTERS
Under-age filters (LowerThan threshold in hours)
UNDER_AGE_HOURS
Under-age thresholds in hours
UNDER_AGE_NAMES
Under-age names
UNDER_AMOUNT_FILTERS
Under-amount filters
UNDER_AMOUNT_NAMES
Under-amount names
UNDER_AMOUNT_THRESHOLDS
Under-amount thresholds

Traits§

AnySeriesPattern
Non-generic trait for series patterns (usable in collections).
CheckedSub
Filtered
FromCoarserIndex
Maps coarser-grained indices to ranges of finer-grained indices.
OptionExt
Extension trait for Option to provide shorter unwrap methods
PrintableIndex
Provides string representations of index types for display and region naming.
SeriesPattern
Generic trait for series patterns with endpoint access.

Functions§

amounts_in_different_buckets
Check if two amounts are in different buckets. O(1).
compute_profitability_boundaries
Compute 24 boundary prices from spot price for profitability bucketing.
de_unquote_i64
de_unquote_limit
de_unquote_usize
extract_json_type
Extract JSON type from a root schema, following $ref and composition keywords.
get_percentile
Get a percentile value from a sorted slice.
pools
zip2_by_addr_type
Zip two ByAddrTypes with a function, producing a new ByAddrType.
zip_by_addr_type
Zip one ByAddrType with a function, producing a new ByAddrType.

Type Aliases§

CostBasisFormatted
Formatted cost basis output. Key: price floor in USD (dollars). Value: BTC (for supply) or USD (for realized/unrealized).
DateRangeBuilder
Date-aware range builder.
DateSeriesEndpoint
Builder for date-based series endpoint queries.
DateSingleItemBuilder
Date-aware single item builder.
DateSkippedBuilder
Date-aware skipped builder.
Result
Result type for BRK client operations.
StoredPhantom