curl -X POST "https://api.blockdb.io/v1/evm/entities/pools" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"exchange_ids": [
2,
3
],
"pool_type_ids": [
201,
302,
3303
],
"contract_address": "1234567890abcdef1234567890abcdef12345678"
}'
#include <curl/curl.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
CURL *curl = curl_easy_init();
if (!curl) return 1;
const char *token = getenv("BLOCKDB_API_KEY");
char auth_header[256];
snprintf(auth_header, sizeof(auth_header), "Authorization: Bearer %s", token ? token : "");
const char *payload = "{\"chain_id\":1,\"from_block\":12345678,\"to_block\":12345999,\"from_timestamp\":\"2025-10-29T00:00:00Z\",\"to_timestamp\":\"2025-11-11T00:00:00Z\",\"exchange_ids\":[2,3],\"pool_type_ids\":[201,302,3303],\"contract_address\":\"1234567890abcdef1234567890abcdef12345678\"}";
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, auth_header);
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://api.blockdb.io/v1/evm/entities/pools");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload);
CURLcode res = curl_easy_perform(curl);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
return res == CURLE_OK ? 0 : 1;
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("BLOCKDB_API_KEY"));
var payload = new StringContent(
"{\"chain_id\":1,\"from_block\":12345678,\"to_block\":12345999,\"from_timestamp\":\"2025-10-29T00:00:00Z\",\"to_timestamp\":\"2025-11-11T00:00:00Z\",\"exchange_ids\":[2,3],\"pool_type_ids\":[201,302,3303],\"contract_address\":\"1234567890abcdef1234567890abcdef12345678\"}",
Encoding.UTF8,
"application/json"
);
var response = await client.PostAsync("https://api.blockdb.io/v1/evm/entities/pools", payload);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
}
import os
import requests
response = requests.post(
"https://api.blockdb.io/v1/evm/entities/pools",
headers={
"Authorization": f"Bearer {os.getenv('BLOCKDB_API_KEY')}",
"Content-Type": "application/json"
},
json={'contract_address': '1234567890abcdef1234567890abcdef12345678',
'chain_id': 1,
'exchange_ids': [2, 3],
'from_block': 12345678,
'from_timestamp': '2025-10-29T00:00:00Z',
'pool_type_ids': [201, 302, 3303],
'to_block': 12345999,
'to_timestamp': '2025-11-11T00:00:00Z'}
)
data = response.json()
print(data)
const response = await fetch("https://api.blockdb.io/v1/evm/entities/pools", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.BLOCKDB_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"exchange_ids": [
2,
3
],
"pool_type_ids": [
201,
302,
3303
],
"contract_address": "1234567890abcdef1234567890abcdef12345678"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"os"
"strings"
)
func main() {
payload := strings.NewReader(`{
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"exchange_ids": [
2,
3
],
"pool_type_ids": [
201,
302,
3303
],
"contract_address": "1234567890abcdef1234567890abcdef12345678"
}`)
req, _ := http.NewRequest("POST", "https://api.blockdb.io/v1/evm/entities/pools", payload)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", os.Getenv("BLOCKDB_API_KEY")))
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
// Handle response
}
{
"meta": {
"chain_id": 1,
"request_window": {
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z"
},
"resolved_window": {
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z"
},
"filters": {
"contract_address": "1234567890abcdef1234567890abcdef12345678",
"pool_uids": null,
"exchange_ids": [
1,
2
],
"pool_type_ids": [
1,
2,
4
]
}
},
"data": [
{
"pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
"exchange_id": 1,
"type_id": 2,
"block_number": 567890,
"block_time": "2018-07-07T12:34:56.000Z",
"tx_index": 4,
"log_index": 2,
"factory": "1f98431c8ad98523631ae4a59f267346ea31f984",
"contract_id": "88e6a0c2ddd26feeb64f039a2c41296fcb3f564000000000000",
"tokens": [
"c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
],
"contract_address": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"pool_id": null,
"pairnum": 42,
"asset_managers": null,
"amp": null,
"weights": [
0.5,
0.5
],
"tick_spacing": null,
"_tracing_id": "0211000000000000000000000000000000000001",
"_parent_tracing_ids": [
"0103000000000000000000000000000000000001",
"0103000000000000000000000000000000000002"
],
"_created_at": "2025-11-11T18:42:15.123Z",
"_updated_at": "2025-11-11T18:42:15.123Z"
}
],
"cursor": null,
"page_count": 1
}
{
"error": {
"code": "BAD_REQUEST",
"http_status": 400,
"message": "The request contains invalid or missing parameters.",
"hint": "Validate all required parameters against the endpoint specification before retrying.",
"severity": "error",
"retryable": false,
"details": {
"invalid_parameters": [
{
"name": "chain_id",
"location": "query",
"reason": "missing",
"expected": "positive integer, e.g. 1"
},
{
"name": "from_timestamp",
"location": "query",
"reason": "invalid_format",
"expected": "ISO-8601 UTC timestamp, e.g. 2025-11-11T00:00:00Z"
}
]
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/home"
}
}
{
"error": {
"code": "UNAUTHORIZED",
"http_status": 401,
"message": "Invalid or missing API key.",
"hint": "Ensure you send 'Authorization: Bearer <API_KEY>' in every request to this endpoint.",
"severity": "error",
"retryable": false,
"details": {
"auth_scheme": "bearer",
"expected_header": "Authorization: Bearer <API_KEY>",
"provided_header": "Authorization: <REDACTED_OR_MISSING>",
"token_status": "invalid_or_missing",
"recommendation": "Regenerate the API key if you suspect it is expired or compromised."
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/authorization"
}
}
{
"error": {
"code": "FORBIDDEN",
"http_status": 403,
"message": "Your API key does not have permission to access this endpoint.",
"hint": "Upgrade your subscription tier or request additional access.",
"severity": "warning",
"retryable": false,
"details": {
"required_plan": "production",
"your_plan": null,
"contact": "support@blockdb.io",
"recommendation": "Contact BlockDB Support Team via email support@blockdb.io."
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "NOT_FOUND",
"http_status": 404,
"message": "The requested resource does not exist.",
"hint": "Verify the API endpoint",
"severity": "warning",
"retryable": false,
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"http_status": 413,
"message": "The requested response exceeds the maximum allowed size of 10 MB.",
"hint": "Reduce the limit, narrow the block or time window, or apply additional filters before retrying.",
"details": {
"max_allowed_bytes": 10485760,
"estimated_response_bytes": 15360000,
"recommended_actions": [
"Decrease the 'limit' parameter value",
"Shorten the block range or time window",
"Filter by fewer pools or exchanges"
]
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/pagination-and-limits"
}
}
{
"error": {
"code": "CHAIN_NOT_SUPPORTED",
"http_status": 422,
"message": "chain_id=137 is not supported.",
"hint": "Use a supported chain_id. Consult the documentation for the list of available chains.",
"severity": "error",
"retryable": false,
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"http_status": 429,
"message": "You have exceeded the allowed request rate.",
"hint": "Introduce client-side throttling or exponential backoff and respect the retry_after_seconds value.",
"details": {
"limit_rps": 1000, # configured rate limit
"current_estimated_rps": 73,
"retry_after_seconds": 2,
"limit_scope": "api_key",
"limit_window_seconds": 1
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/rate-limiting"
}
}
{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"http_status": 500,
"message": "An unexpected server error occurred.",
"hint": "This error is not caused by your request. You may retry after a short delay.",
"severity": "critical",
"retryable": true,
"details": {
"incident_id": "INC-2025-11-11-123456",
"temporary_issue": true,
"expected_recovery_seconds": 5
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "SERVICE_UNAVAILABLE",
"http_status": 503,
"message": "The service is temporarily unable to handle the request.",
"hint": "The database connection pool is briefly saturated. Retry after a short delay.",
"severity": "warning",
"retryable": true,
"details": null,
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
Entities
Pools
List AMM pools with reserves, fee tiers, and routing hints.
POST
/
v1
/
evm
/
entities
/
pools
curl -X POST "https://api.blockdb.io/v1/evm/entities/pools" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"exchange_ids": [
2,
3
],
"pool_type_ids": [
201,
302,
3303
],
"contract_address": "1234567890abcdef1234567890abcdef12345678"
}'
#include <curl/curl.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
CURL *curl = curl_easy_init();
if (!curl) return 1;
const char *token = getenv("BLOCKDB_API_KEY");
char auth_header[256];
snprintf(auth_header, sizeof(auth_header), "Authorization: Bearer %s", token ? token : "");
const char *payload = "{\"chain_id\":1,\"from_block\":12345678,\"to_block\":12345999,\"from_timestamp\":\"2025-10-29T00:00:00Z\",\"to_timestamp\":\"2025-11-11T00:00:00Z\",\"exchange_ids\":[2,3],\"pool_type_ids\":[201,302,3303],\"contract_address\":\"1234567890abcdef1234567890abcdef12345678\"}";
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, auth_header);
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://api.blockdb.io/v1/evm/entities/pools");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload);
CURLcode res = curl_easy_perform(curl);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
return res == CURLE_OK ? 0 : 1;
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("BLOCKDB_API_KEY"));
var payload = new StringContent(
"{\"chain_id\":1,\"from_block\":12345678,\"to_block\":12345999,\"from_timestamp\":\"2025-10-29T00:00:00Z\",\"to_timestamp\":\"2025-11-11T00:00:00Z\",\"exchange_ids\":[2,3],\"pool_type_ids\":[201,302,3303],\"contract_address\":\"1234567890abcdef1234567890abcdef12345678\"}",
Encoding.UTF8,
"application/json"
);
var response = await client.PostAsync("https://api.blockdb.io/v1/evm/entities/pools", payload);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
}
import os
import requests
response = requests.post(
"https://api.blockdb.io/v1/evm/entities/pools",
headers={
"Authorization": f"Bearer {os.getenv('BLOCKDB_API_KEY')}",
"Content-Type": "application/json"
},
json={'contract_address': '1234567890abcdef1234567890abcdef12345678',
'chain_id': 1,
'exchange_ids': [2, 3],
'from_block': 12345678,
'from_timestamp': '2025-10-29T00:00:00Z',
'pool_type_ids': [201, 302, 3303],
'to_block': 12345999,
'to_timestamp': '2025-11-11T00:00:00Z'}
)
data = response.json()
print(data)
const response = await fetch("https://api.blockdb.io/v1/evm/entities/pools", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.BLOCKDB_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"exchange_ids": [
2,
3
],
"pool_type_ids": [
201,
302,
3303
],
"contract_address": "1234567890abcdef1234567890abcdef12345678"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"os"
"strings"
)
func main() {
payload := strings.NewReader(`{
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"exchange_ids": [
2,
3
],
"pool_type_ids": [
201,
302,
3303
],
"contract_address": "1234567890abcdef1234567890abcdef12345678"
}`)
req, _ := http.NewRequest("POST", "https://api.blockdb.io/v1/evm/entities/pools", payload)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", os.Getenv("BLOCKDB_API_KEY")))
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
// Handle response
}
{
"meta": {
"chain_id": 1,
"request_window": {
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z"
},
"resolved_window": {
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z"
},
"filters": {
"contract_address": "1234567890abcdef1234567890abcdef12345678",
"pool_uids": null,
"exchange_ids": [
1,
2
],
"pool_type_ids": [
1,
2,
4
]
}
},
"data": [
{
"pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
"exchange_id": 1,
"type_id": 2,
"block_number": 567890,
"block_time": "2018-07-07T12:34:56.000Z",
"tx_index": 4,
"log_index": 2,
"factory": "1f98431c8ad98523631ae4a59f267346ea31f984",
"contract_id": "88e6a0c2ddd26feeb64f039a2c41296fcb3f564000000000000",
"tokens": [
"c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
],
"contract_address": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"pool_id": null,
"pairnum": 42,
"asset_managers": null,
"amp": null,
"weights": [
0.5,
0.5
],
"tick_spacing": null,
"_tracing_id": "0211000000000000000000000000000000000001",
"_parent_tracing_ids": [
"0103000000000000000000000000000000000001",
"0103000000000000000000000000000000000002"
],
"_created_at": "2025-11-11T18:42:15.123Z",
"_updated_at": "2025-11-11T18:42:15.123Z"
}
],
"cursor": null,
"page_count": 1
}
{
"error": {
"code": "BAD_REQUEST",
"http_status": 400,
"message": "The request contains invalid or missing parameters.",
"hint": "Validate all required parameters against the endpoint specification before retrying.",
"severity": "error",
"retryable": false,
"details": {
"invalid_parameters": [
{
"name": "chain_id",
"location": "query",
"reason": "missing",
"expected": "positive integer, e.g. 1"
},
{
"name": "from_timestamp",
"location": "query",
"reason": "invalid_format",
"expected": "ISO-8601 UTC timestamp, e.g. 2025-11-11T00:00:00Z"
}
]
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/home"
}
}
{
"error": {
"code": "UNAUTHORIZED",
"http_status": 401,
"message": "Invalid or missing API key.",
"hint": "Ensure you send 'Authorization: Bearer <API_KEY>' in every request to this endpoint.",
"severity": "error",
"retryable": false,
"details": {
"auth_scheme": "bearer",
"expected_header": "Authorization: Bearer <API_KEY>",
"provided_header": "Authorization: <REDACTED_OR_MISSING>",
"token_status": "invalid_or_missing",
"recommendation": "Regenerate the API key if you suspect it is expired or compromised."
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/authorization"
}
}
{
"error": {
"code": "FORBIDDEN",
"http_status": 403,
"message": "Your API key does not have permission to access this endpoint.",
"hint": "Upgrade your subscription tier or request additional access.",
"severity": "warning",
"retryable": false,
"details": {
"required_plan": "production",
"your_plan": null,
"contact": "support@blockdb.io",
"recommendation": "Contact BlockDB Support Team via email support@blockdb.io."
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "NOT_FOUND",
"http_status": 404,
"message": "The requested resource does not exist.",
"hint": "Verify the API endpoint",
"severity": "warning",
"retryable": false,
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"http_status": 413,
"message": "The requested response exceeds the maximum allowed size of 10 MB.",
"hint": "Reduce the limit, narrow the block or time window, or apply additional filters before retrying.",
"details": {
"max_allowed_bytes": 10485760,
"estimated_response_bytes": 15360000,
"recommended_actions": [
"Decrease the 'limit' parameter value",
"Shorten the block range or time window",
"Filter by fewer pools or exchanges"
]
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/pagination-and-limits"
}
}
{
"error": {
"code": "CHAIN_NOT_SUPPORTED",
"http_status": 422,
"message": "chain_id=137 is not supported.",
"hint": "Use a supported chain_id. Consult the documentation for the list of available chains.",
"severity": "error",
"retryable": false,
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"http_status": 429,
"message": "You have exceeded the allowed request rate.",
"hint": "Introduce client-side throttling or exponential backoff and respect the retry_after_seconds value.",
"details": {
"limit_rps": 1000, # configured rate limit
"current_estimated_rps": 73,
"retry_after_seconds": 2,
"limit_scope": "api_key",
"limit_window_seconds": 1
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/rate-limiting"
}
}
{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"http_status": 500,
"message": "An unexpected server error occurred.",
"hint": "This error is not caused by your request. You may retry after a short delay.",
"severity": "critical",
"retryable": true,
"details": {
"incident_id": "INC-2025-11-11-123456",
"temporary_issue": true,
"expected_recovery_seconds": 5
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "SERVICE_UNAVAILABLE",
"http_status": 503,
"message": "The service is temporarily unable to handle the request.",
"hint": "The database connection pool is briefly saturated. Retry after a short delay.",
"severity": "warning",
"retryable": true,
"details": null,
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
Overview
- Dataset ID:
0211 - Liquidity Pools - Description: Canonical list of pools; child time-series tables FK to blockdb_evm.b0211_liquidity_pools_v1(pool_uid).
- CSV Sample: Download
- JSON Sample: Download
Parameters
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.
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.
Pool Selectors
Specific pool contract address to return (hex string, 20 bytes, no
0x prefix). May be used on its own, without a block or time range.Internal BlockDB pool ids to return (each a 32-byte hex string, no
0x prefix). May be used on its own, without a block or time range.Filter snapshots by exchange IDs. See the DigitalExchange enumeration for supported values.
Filter pools by archetype. See the PoolType enumeration for supported values.
Response Fields
Meta
Echo of request metadata applied to the response.
EVM chain ID echoed from the request.
Pure echo of the window you sent (
from_block/to_block/from_timestamp/to_timestamp); unset bounds are null.The concrete window the query actually executed against, after resolving the request. For a block range on a time-bucketed endpoint (OHLC/VWAP/VWAP-aggregate/fiat VWAP),
from_timestamp/to_timestamp hold the resolved timestamp window (and from_block/to_block echo your request). For a time range on a block-keyed endpoint, from_block/to_block hold the resolved block range (and the timestamps echo your request). null for selector-only requests (no window). No extra database work is done — these are the values the query already computed.Resolved/echoed start block of the executed window.
Resolved/echoed end block of the executed window.
Resolved/echoed start timestamp (ISO-8601) of the executed window.
Resolved/echoed end timestamp (ISO-8601) of the executed window.
Filter parameters echoed from the request.
Data
Array of pool objects. Each row matches the linked dataset.
Internal BlockDB pool id (32-byte hex string, no
0x prefix).Exchange/DEX identifier. See the DigitalExchange enumeration for supported values.
Block number where the pool was first recognized.
Block time (ISO-8601).
Zero-based transaction index within the block.
Zero-based log index within the transaction.
Factory or pool-manager contract address (hex, 20 bytes, no
0x prefix).Token contract addresses that compose the pool (each hex, 20 bytes, no
0x prefix).Incarnation ID for v2/v3 pools: 20B address + 4B creation block + 2B tx_index (hex-encoded). NULL for v4-style pools.
On-chain pool contract address when applicable (hex, 20 bytes, no
0x prefix).Protocol-specific pool id when applicable (for example Uniswap V4), hex string without
0x.Ordinal for the pair within the exchange, when applicable.
Asset manager contract addresses for Balancer-style pools (hex strings), or
null.Amplification parameter for stable pools, when applicable.
Token weights for weighted pools, when applicable.
Tick spacing for concentrated-liquidity pools, when applicable.
Row-level lineage hash (hex string, no
0x prefix).Lineage references of immediate parents (hex strings).
Record creation timestamp (ISO-8601).
Last update timestamp (ISO-8601).
Envelope Fields
Cursor token for pagination.
Number of records returned in
data.curl -X POST "https://api.blockdb.io/v1/evm/entities/pools" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"exchange_ids": [
2,
3
],
"pool_type_ids": [
201,
302,
3303
],
"contract_address": "1234567890abcdef1234567890abcdef12345678"
}'
#include <curl/curl.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
CURL *curl = curl_easy_init();
if (!curl) return 1;
const char *token = getenv("BLOCKDB_API_KEY");
char auth_header[256];
snprintf(auth_header, sizeof(auth_header), "Authorization: Bearer %s", token ? token : "");
const char *payload = "{\"chain_id\":1,\"from_block\":12345678,\"to_block\":12345999,\"from_timestamp\":\"2025-10-29T00:00:00Z\",\"to_timestamp\":\"2025-11-11T00:00:00Z\",\"exchange_ids\":[2,3],\"pool_type_ids\":[201,302,3303],\"contract_address\":\"1234567890abcdef1234567890abcdef12345678\"}";
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, auth_header);
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://api.blockdb.io/v1/evm/entities/pools");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload);
CURLcode res = curl_easy_perform(curl);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
return res == CURLE_OK ? 0 : 1;
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("BLOCKDB_API_KEY"));
var payload = new StringContent(
"{\"chain_id\":1,\"from_block\":12345678,\"to_block\":12345999,\"from_timestamp\":\"2025-10-29T00:00:00Z\",\"to_timestamp\":\"2025-11-11T00:00:00Z\",\"exchange_ids\":[2,3],\"pool_type_ids\":[201,302,3303],\"contract_address\":\"1234567890abcdef1234567890abcdef12345678\"}",
Encoding.UTF8,
"application/json"
);
var response = await client.PostAsync("https://api.blockdb.io/v1/evm/entities/pools", payload);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
}
import os
import requests
response = requests.post(
"https://api.blockdb.io/v1/evm/entities/pools",
headers={
"Authorization": f"Bearer {os.getenv('BLOCKDB_API_KEY')}",
"Content-Type": "application/json"
},
json={'contract_address': '1234567890abcdef1234567890abcdef12345678',
'chain_id': 1,
'exchange_ids': [2, 3],
'from_block': 12345678,
'from_timestamp': '2025-10-29T00:00:00Z',
'pool_type_ids': [201, 302, 3303],
'to_block': 12345999,
'to_timestamp': '2025-11-11T00:00:00Z'}
)
data = response.json()
print(data)
const response = await fetch("https://api.blockdb.io/v1/evm/entities/pools", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.BLOCKDB_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"exchange_ids": [
2,
3
],
"pool_type_ids": [
201,
302,
3303
],
"contract_address": "1234567890abcdef1234567890abcdef12345678"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"os"
"strings"
)
func main() {
payload := strings.NewReader(`{
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"exchange_ids": [
2,
3
],
"pool_type_ids": [
201,
302,
3303
],
"contract_address": "1234567890abcdef1234567890abcdef12345678"
}`)
req, _ := http.NewRequest("POST", "https://api.blockdb.io/v1/evm/entities/pools", payload)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", os.Getenv("BLOCKDB_API_KEY")))
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
// Handle response
}
{
"meta": {
"chain_id": 1,
"request_window": {
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z"
},
"resolved_window": {
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z"
},
"filters": {
"contract_address": "1234567890abcdef1234567890abcdef12345678",
"pool_uids": null,
"exchange_ids": [
1,
2
],
"pool_type_ids": [
1,
2,
4
]
}
},
"data": [
{
"pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
"exchange_id": 1,
"type_id": 2,
"block_number": 567890,
"block_time": "2018-07-07T12:34:56.000Z",
"tx_index": 4,
"log_index": 2,
"factory": "1f98431c8ad98523631ae4a59f267346ea31f984",
"contract_id": "88e6a0c2ddd26feeb64f039a2c41296fcb3f564000000000000",
"tokens": [
"c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
],
"contract_address": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"pool_id": null,
"pairnum": 42,
"asset_managers": null,
"amp": null,
"weights": [
0.5,
0.5
],
"tick_spacing": null,
"_tracing_id": "0211000000000000000000000000000000000001",
"_parent_tracing_ids": [
"0103000000000000000000000000000000000001",
"0103000000000000000000000000000000000002"
],
"_created_at": "2025-11-11T18:42:15.123Z",
"_updated_at": "2025-11-11T18:42:15.123Z"
}
],
"cursor": null,
"page_count": 1
}
{
"error": {
"code": "BAD_REQUEST",
"http_status": 400,
"message": "The request contains invalid or missing parameters.",
"hint": "Validate all required parameters against the endpoint specification before retrying.",
"severity": "error",
"retryable": false,
"details": {
"invalid_parameters": [
{
"name": "chain_id",
"location": "query",
"reason": "missing",
"expected": "positive integer, e.g. 1"
},
{
"name": "from_timestamp",
"location": "query",
"reason": "invalid_format",
"expected": "ISO-8601 UTC timestamp, e.g. 2025-11-11T00:00:00Z"
}
]
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/home"
}
}
{
"error": {
"code": "UNAUTHORIZED",
"http_status": 401,
"message": "Invalid or missing API key.",
"hint": "Ensure you send 'Authorization: Bearer <API_KEY>' in every request to this endpoint.",
"severity": "error",
"retryable": false,
"details": {
"auth_scheme": "bearer",
"expected_header": "Authorization: Bearer <API_KEY>",
"provided_header": "Authorization: <REDACTED_OR_MISSING>",
"token_status": "invalid_or_missing",
"recommendation": "Regenerate the API key if you suspect it is expired or compromised."
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/authorization"
}
}
{
"error": {
"code": "FORBIDDEN",
"http_status": 403,
"message": "Your API key does not have permission to access this endpoint.",
"hint": "Upgrade your subscription tier or request additional access.",
"severity": "warning",
"retryable": false,
"details": {
"required_plan": "production",
"your_plan": null,
"contact": "support@blockdb.io",
"recommendation": "Contact BlockDB Support Team via email support@blockdb.io."
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "NOT_FOUND",
"http_status": 404,
"message": "The requested resource does not exist.",
"hint": "Verify the API endpoint",
"severity": "warning",
"retryable": false,
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"http_status": 413,
"message": "The requested response exceeds the maximum allowed size of 10 MB.",
"hint": "Reduce the limit, narrow the block or time window, or apply additional filters before retrying.",
"details": {
"max_allowed_bytes": 10485760,
"estimated_response_bytes": 15360000,
"recommended_actions": [
"Decrease the 'limit' parameter value",
"Shorten the block range or time window",
"Filter by fewer pools or exchanges"
]
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/pagination-and-limits"
}
}
{
"error": {
"code": "CHAIN_NOT_SUPPORTED",
"http_status": 422,
"message": "chain_id=137 is not supported.",
"hint": "Use a supported chain_id. Consult the documentation for the list of available chains.",
"severity": "error",
"retryable": false,
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"http_status": 429,
"message": "You have exceeded the allowed request rate.",
"hint": "Introduce client-side throttling or exponential backoff and respect the retry_after_seconds value.",
"details": {
"limit_rps": 1000, # configured rate limit
"current_estimated_rps": 73,
"retry_after_seconds": 2,
"limit_scope": "api_key",
"limit_window_seconds": 1
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/rate-limiting"
}
}
{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"http_status": 500,
"message": "An unexpected server error occurred.",
"hint": "This error is not caused by your request. You may retry after a short delay.",
"severity": "critical",
"retryable": true,
"details": {
"incident_id": "INC-2025-11-11-123456",
"temporary_issue": true,
"expected_recovery_seconds": 5
},
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
{
"error": {
"code": "SERVICE_UNAVAILABLE",
"http_status": 503,
"message": "The service is temporarily unable to handle the request.",
"hint": "The database connection pool is briefly saturated. Retry after a short delay.",
"severity": "warning",
"retryable": true,
"details": null,
"docs_url": "https://docs.blockdb.io/api-reference/overview/error-codes"
}
}
Last modified on May 29, 2026
Was this page helpful?
⌘I