Messages
No examples found{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>"
}No examples foundNo examples foundNo examples foundYields & ROI
Yields
Subscribe to real-time rolling pool yield and ROI predictions.
WSS
Overview
- Dataset ID:
0411 - Liquidity Pool Yields - Description: Rolling yield/ROI predictions per pool over fixed horizons (1D, 3D, 7D, 14D, 30D, 90D, 365D), based on historical swap fees (blockdb_evm.b0303_liquidity_pools_swap_fees_v1) and current reserves (latest blockdb_evm.b0301_liquidity_pools_reserves_v1 snapshot).
- Sample: Hugging Face Sample
Subscription Parameters
Target horizon in days (e.g., 1, 7, 30).
Filter updates to specific BlockDB pool identifiers.
Message Fields
BlockDB pool identifier.
Exchange/DEX identifier.
Pool type identifier.
Block height of the prediction anchor.
Block time (ISO-8601).
Transaction index.
Log index.
Target horizon in days.
History actually used (must be
> 0 and <= target_period_days).true when observed_period_days == target_period_days.true when the row is scaled from shorter history.Scaling factor applied when extrapolating (string to preserve precision).
Start time of the observed window.
End time of the observed window.
Pool token addresses (aligned arrays index by this order).
Current reserves per token (decimals-adjusted).
Observed traded volume per token in the window.
Predicted traded volume per token for the target horizon.
Observed user/LP fees per token in the window.
Predicted user/LP fees per token for the target horizon.
Predicted ROI fraction per token for the target horizon.
Row-level lineage hash for correlation.
Parent lineage ids (hex).
Record creation time (ISO-8601).
Record last update time (ISO-8601).
Subscription Example
# Use wscat to connect and subscribe
wscat -c wss://api.blockdb.io/v1/evm/ \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-x '{"action": "subscribe", "dataset_id": "0411", "chain_id": 1, "params": {"target_period_days": 7}}'
Response Example
{
"chain_id": 1,
"dataset_id": "0411",
"is_reorg": false,
"data": {
"pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
"exchange_id": 1,
"type_id": 201,
"block_number": 19001234,
"block_time": "2025-12-20T12:34:56Z",
"tx_index": 7,
"log_index": 12,
"target_period_days": 30,
"observed_period_days": 30,
"is_full_period": true,
"is_extrapolated": false,
"extrapolation_factor": "1.000000",
"window_start_time": "2025-11-20T12:34:56Z",
"window_end_time": "2025-12-20T12:34:56Z",
"tokens": [
"c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
],
"current_reserves": [
"1250.000000000000000000",
"3950000.000000000000000000"
],
"volume_observed": [
"12000.000000000000000000",
"0.000000000000000000"
],
"volume_predicted": [
"12000.000000000000000000",
"0.000000000000000000"
],
"user_fees_observed": [
"36.000000000000000000",
"0.000000000000000000"
],
"user_fees_predicted": [
"36.000000000000000000",
"0.000000000000000000"
],
"roi_predicted": [
"0.028800000000000000",
"0.000000000000000000"
],
"_tracing_id": "0411c0ffee000000000000000000000000000000000000000000000000000001",
"_parent_tracing_ids": [
"0303c0ffee000000000000000000000000000000000000000000000000000001",
"0301c0ffee000000000000000000000000000000000000000000000000000001"
],
"_created_at": "2025-12-20T12:35:01Z",
"_updated_at": "2025-12-20T12:35:01Z"
}
}
Messages
No examples found{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>"
}No examples foundNo examples foundNo examples foundsubscribe
type:object
unsubscribe
type:object
subscribe_response
type:object
unsubscribe_response
type:object
update
type:object
Last modified on April 6, 2026
Was this page helpful?
⌘I