Overview
Parameters
Target EVM chain. See the Chain enumeration for supported values.
ERC-20 contract address for the base asset (hex string, 20 bytes, no 0x prefix).
ERC-20 contract address for the quote asset (hex string, 20 bytes, no 0x prefix).
Range Filters (mutually exclusive)
Starting block number (inclusive) for the query. Use with to_block.
Ending block number (inclusive) for the query. Use with from_block.
Starting timestamp (ISO-8601). If it falls between blocks, the next block after this timestamp is used. Use with to_timestamp.
Ending timestamp (ISO-8601). If it falls between blocks, the last block before this timestamp is used. Use with from_timestamp.
Validation rule:
You must provide either a block range, a time range, or at least one direct selector.
Providing more than one option results in HTTP 400.
Providing none results in HTTP 400.
Direct Selectors
Optional: restrict contributing venues to specific exchanges. See the DigitalExchange enumeration.
Recommended default 250; maximum 1000 to stay under ~10 MB responses.
Opaque pagination cursor supplied by a previous response.
Response Fields
Echo of request metadata applied to the response.
EVM chain ID echoed from the request.
ERC-20 contract address of the base asset, echoed from the request.
ERC-20 contract address of the quote asset, echoed from the request.
Normalized block/timestamp bounds derived from the request.
Filter parameters echoed from the request.
Data
Cross-pool VWAP aggregates matching the request.
First contributing event block across all pools.
First contributing event time (ISO-8601).
First contributing tx_index.
First contributing log_index.
Last contributing event block across all pools.
Last contributing event time (ISO-8601).
Last contributing tx_index.
Last contributing log_index.
Inclusive UTC start of the VWAP bucket (ISO-8601).
Input token address (hex, 20 bytes, no 0x prefix).
Output token address (hex, 20 bytes, no 0x prefix).
Cross-venue VWAP (token_out per 1 token_in, decimals-adjusted). Returned as a string to preserve precision.
Total traded token_in across all contributing pools (decimals-adjusted). Returned as a string to preserve precision.
Total received token_out across all contributing pools (decimals-adjusted). Returned as a string to preserve precision.
Total swaps across all contributing pools.
Distinct pools that contributed to the bucket.
Unique BlockDB tracing id for the row (hex string, no 0x prefix).
Tracing IDs of contributing per-pool VWAP (0405) bars. null/omitted by default (disabled).
Record creation timestamp (ISO-8601).
Record update timestamp (ISO-8601).
Envelope Fields
Number of VWAP entries returned.
Usage Notes
curl -X POST "https://api.blockdb.io/v1/evm/prices/spot/crypto/vwap/aggregate" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"from_block": 18930000,
"to_block": 18939999,
"exchange_ids": [1, 2],
"limit": 200,
"cursor": null
}'
{
"meta": {
"chain_id": 1,
"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"request_window": {
"from_block": 18930000,
"to_block": 18939999,
"from_timestamp": null,
"to_timestamp": null
},
"filters": {
"exchange_ids": [],
"limit": 200,
"cursor": null
}
},
"data": [
{
"first_block_number": 18930000,
"first_block_time": "2025-11-11T18:00:11.000Z",
"first_tx_index": 12,
"first_log_index": 5,
"last_block_number": 18939999,
"last_block_time": "2025-11-11T18:59:48.000Z",
"last_tx_index": 44,
"last_log_index": 2,
"bucket_start": "2025-11-11T18:00:00.000Z",
"bucket_seconds": 3600,
"token_in": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"token_out": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"price_vwap": "3024.112233445566778899",
"total_volume_in": "580.000000000000000000",
"total_volume_out": "1750000.000000000000000000",
"trade_count": 142,
"pool_count": 23,
"_tracing_id": "0505000000000000000000000000000000000001",
"_parent_tracing_ids": null,
"_created_at": "2025-11-11T19:00:05.000Z",
"_updated_at": "2025-11-11T19:00:05.000Z"
}
],
"cursor": null,
"count": 1
}