Query onchain data across EVM, Solana, Bitcoin, Substrate, and Hyperliquid via the SQD Portal API.
Query blockchain data across EVM, Solana, Bitcoin, Substrate, and Hyperliquid.
Topics
ai-agentsblockchainmcpsqdsubsquidtypescriptweb3
Captured live from the server via tools/list.
portal_list_networks
Find the right network or chain name to use across EVM, Solana, Bitcoin, Substrate, and Hyperliquid.
COMMON USER ASKS:
- Find Base-like networks
- Show Solana mainnets
- Show Substrate mainnets
FIRST CHOICE FOR:
- finding the correct network before any other query
WHEN TO USE:
- You are not sure which network name, chain name, or alias to use.
- You want to filter networks by VM family, network type, or real-time availability.
DON'T USE:
- You already know the exact network and want live data from that network.
EXAMPLES:
- Find Base-like networks: {"query":"base","limit":10}
- Show Solana mainnets: {"vm":"solana","network_type":"mainnet"}
- Show Substrate mainnets: {"vm":"substrate","network_type":"mainnet"}
Parameters (5)
vmstring
Filter by VM family
network_typestring
Filter by network type
querystring
Search by name, alias, or chain ID
real_time_onlyboolean
Only show networks with a real-time indexed head
limitnumber
Max results to return (default: 25, max: 100)
portal_get_network_info
Answer "is this network caught up?" with indexing freshness, lag, heads, and available tables.
COMMON USER ASKS:
- Is Base caught up?
FIRST CHOICE FOR:
- checking indexing head, lag, tables, and capabilities for one network
WHEN TO USE:
- You want to know whether a network is indexed, fresh, caught up, or behind before querying.
- You need chain family, real-time status, or available tables for a network.
DON'T USE:
- You only need the latest block or slot number.
EXAMPLES:
- Is Base caught up?: {"network":"base-mainnet"}
Parameters (1)
networkstringrequired
Network name or alias
portal_get_head
Get just the latest indexed head block or slot for a network.
COMMON USER ASKS:
- Latest head
- Finalized head
FIRST CHOICE FOR:
- getting the current indexed head before building a manual block range
WHEN TO USE:
- You only need the current block or slot number.
- You need the current head before building a raw block-range query.
DON'T USE:
- You want to know if the network is caught up, behind, fresh, or what tables are available.
EXAMPLES:
- Latest head: {"network":"base-mainnet"}
- Finalized head: {"network":"ethereum-mainnet","type":"finalized"}
Parameters (2)
networkstringrequired
Network name or alias
typestring
Block type
portal_resolve_entity
Resolve user-facing blockchain entities into query-ready identifiers, with ambiguity kept explicit.
COMMON USER ASKS:
- Resolve USDC on Base
- Resolve WETH on Ethereum
- Resolve BAYC contract
FIRST CHOICE FOR:
- resolving a token symbol like USDC to token contract addresses
- resolving EVM contract aliases, protocol names, pool identifiers, or Hyperliquid coin names before querying
- checking which token-list addresses a symbol maps to before querying logs or transfers
- turning a user-friendly token name into deterministic EVM filters
WHEN TO USE:
- The user names a token symbol such as USDC, WETH, DAI, or PEPE and you need contract addresses before querying raw data.
- The user names a well-known EVM contract, protocol, pool identifier, or Hyperliquid ticker and you need a deterministic follow-up filter.
- You need to disambiguate bridged token variants on an EVM network.
- You want a source-backed token address rather than relying on memory or hardcoded constants.
DON'T USE:
- You already have the exact address, pool id, protocol slug, or coin filter and can pass it directly.
EXAMPLES:
- Resolve USDC on Base: {"network":"base-mainnet","kind":"token","query":"USDC","limit":10}
- Resolve WETH on Ethereum: {"network":"ethereum-mainnet","kind":"token","query":"WETH","limit":5}
- Resolve BAYC contract: {"network":"ethereum-mainnet","kind":"contract","query":"bored apes"}
- Resolve Hyperliquid coin: {"kind":"hyperliquid_coin","query":"bitcoin"}
Parameters (4)
networkstring
Network name or alias when the entity is network-scoped, e.g. "base", "ethereum", "arbitrum-one", or "hyperliquid-fills".
kindstring
Entity kind to resolve: token, contract alias/address, pool identifier, protocol name, or Hyperliquid coin/ticker.
querystringrequired
Entity string to resolve, e.g. "USDC", "bayc", "uniswap", "BTC", or "0x...".
limitnumber
Maximum matches to return.
portal_get_recent_activity
Get a simple recent-activity feed across EVM, Solana, Bitcoin, or Hyperliquid with chronological paging and investigation pivots.
COMMON USER ASKS:
- Recent activity on Base
- Recent Hyperliquid fills
FIRST CHOICE FOR:
- recent activity on any supported network without manual block math
- questions like "what has been happening on Base lately?"
- first-pass incident triage when the user asks what happened recently on a network
WHEN TO USE:
- You want a quick recent-activity feed for a network.
- You want to ask what has been happening lately on a network and see the newest activity first.
- You want the simplest starting point before reaching for raw VM-specific query tools.
- You are investigating an incident and need a bounded, recent evidence timeline before narrowing to wallets, transfers, logs, or fills.
DON'T USE:
- You need raw logs, instructions, or chain-specific fields that only raw query tools return.
- You want a chart over time rather than a recent feed.
EXAMPLES:
- Recent activity on Base: {"network":"base-mainnet","timeframe":"1h","limit":10}
- Recent Hyperliquid fills: {"network":"hyperliquid-fills","timeframe":"1h","limit":10}
Parameters (8)
networkstring
Network name (supports short names: 'polygon', 'base', 'ethereum', 'arbitrum', etc.). Optional when continuing with cursor.
timeframestring
Time period or block count. Examples: '100' (default), '1h', '6h', '24h', '7d', '3d'.
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
from_addressesarray
Filter by sender addresses
to_addressesarray
Filter by recipient addresses
limitnumber
Max transactions to return (max: 200)
cursorstring
Continuation cursor from a previous response
portal_get_wallet_summary
Summarize wallet activity and fund flow with shared overview, asset movement, counterparties, evidence pivots, and follow-up filters across supported networks.
COMMON USER ASKS:
- EVM wallet fund-flow triage
- Solana wallet activity and fee flow
FIRST CHOICE FOR:
- one-call wallet analysis across supported VMs
- suspicious wallet triage, fund-flow direction, counterparties, and next evidence pivots before drilling into raw records
WHEN TO USE:
- You want a single high-level answer about what one wallet has been doing and where value appears to move.
- You want inbound/outbound flow, top counterparties, largest movements, and exact next pivots before drilling into raw transactions or fills.
- The user asks to investigate a suspicious wallet, stolen-funds path, exploit counterparty, or incident address.
DON'T USE:
- You need every raw record with full chain-specific fields and no summarization.
EXAMPLES:
- EVM wallet fund-flow triage: {"network":"base-mainnet","address":"0xabc...","timeframe":"24h"}
- Solana wallet activity and fee flow: {"network":"solana-mainnet","address":"Vote111...","timeframe":"6h"}
Parameters (11)
networkstring
Network name or alias. Optional when continuing with cursor.
addressstring
Wallet address to analyze. Optional when continuing with cursor.
timeframestring
Look-back period as timeframe or block count. Examples: '1h', '24h', '7d', '3d', '1000'.
from_timestampstring | number
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampstring | number
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
include_tokensboolean
Include ERC20 token transfers
include_nftsboolean
Include NFT transfers (ERC721/1155)
limit_per_typenumber
Max items per category (txs, tokens, nfts)
modestring
Execution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews.
response_formatstring
Response format: defaults to 'compact' for a readable wallet investigation. Use 'summary' for headline flow only or 'full' for all returned activity rows.
cursorstring
Continuation cursor from a previous response
portal_get_time_series
Build simple activity charts and other time-series views across supported VMs, including compare-previous windows and grouped EVM contract trends.
COMMON USER ASKS:
- Base transactions per 15m bucket
- Compare two periods
FIRST CHOICE FOR:
- activity over time, compare-current-vs-previous, grouped trends, and simple activity charts
WHEN TO USE:
- You want chart-ready metric buckets over time.
- You want a simple activity chart for a network, defaulting to a 6h interactive window unless a longer window is explicitly requested.
- You want to compare the current period to the previous period.
DON'T USE:
- You need raw record lists instead of aggregated buckets.
- You need DEX pool candles or OHLC output.
EXAMPLES:
- Base transactions per 15m bucket: {"network":"base-mainnet","metric":"transaction_count","duration":"6h","interval":"15m"}
- Compare two periods: {"network":"solana-mainnet","metric":"transaction_count","duration":"1h","interval":"5m","compare_previous":true}
Parameters (11)
networkstringrequired
Network name (supports short names: 'ethereum', 'polygon', 'base', etc.)
metricstringrequired
Metric to aggregate over time
intervalstringrequired
Time bucket interval (5m, 15m, 1h, 6h, 1d)
durationstring
Total time period to analyze. Defaults to "6h" for interactive use. Explicit longer windows like "24h" or "7d" are supported but can take longer. Accepts compact durations like "30m" or natural phrases like "past 30 minutes".
addressstring
Optional: Filter to specific contract address for contract-specific trends
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "24h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
compare_previousboolean
Compare the selected window against the immediately previous window
group_bystring
Optional grouping mode. contract is currently supported only for EVM transaction_count
group_limitnumber
Maximum number of contract groups when group_by=contract
modestring
Execution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews.
portal_evm_query_logs
Query raw EVM logs with address/topic filters, common event aliases, earliest/latest scanning, and optional inline decoding.
COMMON USER ASKS:
- Recent USDC Transfer logs
- First recent USDC Transfer log
- Latest ERC721/pass mint ID and tx hash
FIRST CHOICE FOR:
- NFT or ERC721 mint lookups such as latest pass minted, token ID, and mint transaction hash
- contract event questions where the user needs exact event evidence rather than wallet or transaction summaries
WHEN TO USE:
- You need event logs filtered by contract or topic signature.
- You want decoded log hints while still keeping the raw log shape available.
- You want the first or last matching event in a bounded block/time window.
- You want common event names such as transfer, approval, swap, mint, or burn instead of remembering topic0 hashes.
- You need the latest ERC721/pass mint in a bounded deployment/recent window: filter Transfer events with topic1 as the zero address, use scan_order=latest, limit=1, and decode=true to expose decoded_log.decoded.token_id plus transaction_hash.
DON'T USE:
- You only want token transfers, which are easier with the token-transfer tool.
EXAMPLES:
- Recent USDC Transfer logs: {"network":"base-mainnet","timeframe":"1h","token_symbols":["USDC"],"event":"transfer","limit":20}
- First recent USDC Transfer log: {"network":"base-mainnet","timeframe":"1h","token_symbols":["USDC"],"event":"transfer","scan_order":"earliest","limit":1}
- Latest ERC721/pass mint ID and tx hash: {"network":"base-mainnet","from_block":46020000,"to_block":46100000,"addresses":["0xE4E70FdF2Fc1147a7f35c4c5de88E6BeA63eeAfA"],"event":"transfer","topic1":["0x0000000000000000000000000000000000000000000000000000000000000000"],"scan_order":"latest","decode":true,"include_transaction":true,"limit":1}
- Decode logs inline: {"network":"ethereum-mainnet","timeframe":"1h","topic0":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"decode":true,"limit":10}
Parameters (24)
networkstring
Network name or alias. Optional when continuing with cursor.
timeframestring
Time range (e.g., '24h', '7d'). Alternative to from_block/to_block. Supported: 1h, 6h, 12h, 24h, 3d, 7d, 14d, 30d
from_blocknumber
Starting block number (use this OR timeframe)
to_blocknumber
Ending block number. RECOMMENDED: <10k blocks for fast (<1s) responses. Larger ranges may be slow or timeout.
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
finalized_onlyboolean
Only query finalized blocks
addressesarray
Contract addresses to filter (e.g., ['0xUSDC...', '0xDAI...']). IMPORTANT: Always include this or topics for fast queries.
token_symbolsarray
Token symbols to resolve via open token-list data and merge into addresses, e.g. ["USDC"].
max_token_symbol_matchesnumber
Maximum token-list matches to include per token symbol. Use addresses for deterministic single-contract filters.
eventany
Common event alias or topic0 hash. Examples: "transfer", "approval", "swap", "sync", "deposit", "withdrawal". Merges with topic0.
topic0array
Event signatures (topic0). E.g., Transfer = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
topic1array
Topic1 filter (often: from address in Transfer, indexed parameter 1)
topic2array
Topic2 filter (often: to address in Transfer, indexed parameter 2)
Which side of the block window to scan first. Use earliest for first-event questions.
limitnumber
Max logs to return (default: 20, max: 200). Note: Lower default for MCP to reduce context usage.
field_presetstring
Field preset: 'minimal' (address+topic0+block, ~80% smaller), 'standard' (all topics+timestamp), 'full' (includes raw data hex, largest). Use 'minimal' to reduce context usage.
response_formatstring
Response format: defaults to 'compact' for chat-friendly output, or stays 'full' when inline transaction context is requested. Use 'summary' for counting or categorizing.
include_transactionboolean
Include parent transaction data
include_transaction_tracesboolean
Include traces for parent transactions
include_transaction_logsboolean
Include all logs from parent transactions
decodeboolean
Decode known log signatures inline when topics/data are available
cursorstring
Continuation cursor from a previous response
portal_evm_query_transactions
Query raw EVM transactions with optional logs, traces, state-diff context, and evidence pivots for transaction-level investigations.
COMMON USER ASKS:
- Recent Base transactions
- Filter by sender
- First EIP-2930 transaction from Berlin fork
WHEN TO USE:
- You need raw transaction records on an EVM network.
- You want chain-specific transaction fields or include flags that convenience tools do not expose.
- You need exact transaction evidence for an investigation, including sender, receiver, transaction hash, logs, traces, or failed calls.
- You need to find the first transaction matching a raw field condition such as transaction type 0x1 from a known block.
- You need top-N raw transactions ranked by value, gas used, or effective gas price.
- You need top senders or receivers from a bounded transaction window.
- You want common method names such as transfer, approve, deposit, or withdraw instead of remembering sighashes.
- You want calls to a token contract by symbol, such as transfer calls to USDC, without hardcoding token addresses.
DON'T USE:
- You only need a quick recent feed or wallet-level summary.
EXAMPLES:
- Recent Base transactions: {"network":"base-mainnet","timeframe":"1h","limit":20}
- Filter by sender: {"network":"ethereum-mainnet","timeframe":"6h","from_addresses":["0xabc..."],"limit":20}
- First EIP-2930 transaction from Berlin fork: {"network":"ethereum-mainnet","from_block":12244000,"transaction_type":"0x1","scan_order":"earliest","limit":1,"field_preset":"minimal"}
- Largest recent calls to a resolved token contract: {"network":"base-mainnet","timeframe":"1h","to_token_symbols":["USDC"],"method":"transfer","order_by":"gas_used_desc","limit":5}
- Top senders by transaction count: {"network":"base-mainnet","timeframe":"1h","aggregate_by":"sender","aggregate_metric":"count","limit":10}
Parameters (35)
networkstring
Network name or alias. Optional when continuing with cursor.
timeframestring
Time range (e.g., '24h', '7d'). Alternative to from_block/to_block. Supported: 1h, 6h, 12h, 24h, 3d, 7d, 14d, 30d. Large ranges OK with low limit (<=100).
from_blocknumber
Starting block number (use this OR timeframe). Large ranges OK with low limit (<=100).
to_blocknumber
Ending block number. RECOMMENDED: <5k blocks for fast (<500ms) responses. Larger ranges may be slow.
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
finalized_onlyboolean
Only query finalized blocks
from_addressesarray
FILTER: Sender addresses (wallets or contracts that initiated the transaction). Optional if limit <=100.
to_addressesarray
FILTER: Recipient addresses (typically contracts being called, or wallets receiving ETH). Optional if limit <=100.
from_token_symbolsarray
Resolve token symbols via open token-list data and merge them into from_addresses. Rare, but useful for token-contract-originated transactions.
to_token_symbolsarray
Resolve token symbols via open token-list data and merge them into to_addresses, e.g. transfer/approve calls to USDC.
max_token_symbol_matchesnumber
Maximum token-list matches to include per token symbol. Use from_addresses/to_addresses for deterministic single-contract filters.
sighasharray
FILTER: Function sighash (4-byte hex, e.g., '0xa9059cbb' for transfer). Optional if limit <=100.
methodany
FILTER: Common EVM method alias or 4-byte sighash. Examples: "transfer", "approve", "transferFrom", "deposit", "withdraw". Merges with sighash.
transaction_typenumber | string
FILTER: EVM transaction type. Accepts decimal or hex strings such as 0, 1, 2, "0x0", "0x1", "0x2". Applied client-side while streaming Portal results; use with scan_order="earliest" and from_block to find the first typed transaction.
transaction_statusany
FILTER: Transaction receipt status. Use "success"/1 or "failed"/0 for failed/reverted transaction searches.
contract_creationboolean
FILTER: true returns contract-creation transactions; false excludes them. Useful for "first contract creation from this wallet".
min_value_weistring | number
FILTER/RANKING: Minimum native token value in wei. Accepts decimal or hex string.
min_gas_usedstring | number
FILTER/RANKING: Minimum receipt gasUsed. Accepts decimal or hex string.
min_effective_gas_price_weistring | number
FILTER/RANKING: Minimum effectiveGasPrice in wei. Accepts decimal or hex string.
order_bystring
Optional ranking for top-N questions. Use value_desc, gas_used_desc, or effective_gas_price_desc.
aggregate_bystring
Optional bounded aggregation for top sender/receiver questions. Returns ranked address rows instead of raw transactions.
aggregate_metricstring
Metric used with aggregate_by. count ranks by tx count; value by total native value; gas_used by total gas used; effective_gas_price by max effective gas price.
max_scan_blocksnumber
Safety cap for first/last/ranked client-side scans. Default: min(window, 10000 blocks).
scan_orderstring
Which side of the block window to scan first. Normal previews default to latest; transaction_type searches default to earliest, so "first tx type 0x1 from block N" scans forward from from_block.
first_noncenumber
Minimum nonce
last_noncenumber
Maximum nonce
limitnumber
Max transactions (default: 20, max: 200). Note: Lower default for MCP to reduce context usage.
field_presetstring
Field preset: 'minimal' (from/to/value+block, ~70% smaller), 'standard' (hash+gas+timestamp), 'full' (includes input data hex, largest). Use 'minimal' to reduce context usage.
response_formatstring
Response format: defaults to 'compact' for chat-friendly output, or stays 'full' when inline logs, traces, or state diffs are requested. Use 'summary' for counting or profiling.
include_logsboolean
Include logs emitted by transactions
include_tracesboolean
Include traces for transactions
include_state_diffsboolean
Include state diffs caused by transactions
include_l2_fieldsboolean
Include L2-specific fields
cursorstring
Continuation cursor from a previous response
portal_evm_query_token_transfers
Query token-transfer activity on EVM without needing to remember Transfer event signatures. Best for "did token X move?" and asset-tracing questions.
COMMON USER ASKS:
- Recent USDC transfers
- First recent USDC transfer
WHEN TO USE:
- You want ERC-20 style transfer activity filtered by token, sender, or recipient.
- You want the fastest answer to a token movement question like "did USDC move?".
- You are tracing suspicious, stolen, bridged, or exploit-related token movement and need sender/recipient/transaction pivots.
- You want the easiest raw transfer query on an EVM network.
- You need the first matching transfer in a bounded window without typing the Transfer topic hash.
DON'T USE:
- You need arbitrary event logs beyond token transfers.
EXAMPLES:
- Recent USDC transfers: {"network":"base-mainnet","timeframe":"1h","token_symbols":["USDC"],"limit":20}
- First recent USDC transfer: {"network":"base-mainnet","timeframe":"1h","token_symbols":["USDC"],"scan_order":"earliest","limit":1}
Parameters (15)
networkstring
Network name or alias. Optional when continuing with cursor.
from_blocknumber
Starting block number
to_blocknumber
Ending block number. RECOMMENDED: <10k blocks for fast responses.
timeframestring
Time range (e.g., '1h', '24h'). Alternative to block numbers.
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
token_addressesarray
Token contract addresses
token_symbolsarray
Token symbols to resolve via open token-list data, e.g. ["USDC"]. Merges with token_addresses.
max_token_symbol_matchesnumber
Maximum token-list matches to include per token symbol. Use token_addresses for deterministic single-contract filters.
from_addressesarray
Sender addresses
to_addressesarray
Recipient addresses
scan_orderstring
Which side of the block window to scan first. Use earliest for first-transfer questions.
limitnumber
Max transfers
include_token_infoboolean
Include token metadata (symbol, decimals) inline. Avoids separate token metadata lookups.
cursorstring
Continuation cursor from a previous response
portal_evm_get_contract_deployment
Locate the create trace and parent transaction that deployed a specific EVM contract address within a bounded window.
COMMON USER ASKS:
- Find BAYC deployment
- Find recent deployment
- Find deployment from known range
FIRST CHOICE FOR:
- who deployed this EVM contract
- when was this contract deployed
- what deployment transaction created this contract
WHEN TO USE:
- You need the deployer, deployment block, deployment timestamp, or deployment transaction for an EVM contract.
- You can provide a starting block/time window, a contract address, or a supported well-known contract alias such as BAYC/Bored Apes.
- You want a deployment lookup instead of general contract activity.
DON'T USE:
- You need all activity for a contract after deployment.
- The contract is old and no block/time hint is available; provide from_block or from_timestamp first.
EXAMPLES:
- Find BAYC deployment: {"network":"ethereum-mainnet","contract":"bored apes","from_block":12000000,"to_block":13000000,"scan_order":"earliest"}
- Find recent deployment: {"network":"base-mainnet","contract_address":"0xabc...","search_depth_blocks":100000}
- Find deployment from known range: {"network":"ethereum-mainnet","contract_address":"0xabc...","from_block":17000000,"to_block":17100000,"scan_order":"earliest"}
Parameters (11)
networkstringrequired
EVM network name or alias, e.g. base, ethereum, arbitrum.
contract_addressstring
Contract address whose deployment transaction should be located.
contractstring
Contract address or a supported well-known alias/name, e.g. "bayc" or "bored apes" on Ethereum.
timeframestring
Optional recent time window to search, e.g. "24h" or "7d".
from_blocknumber
Optional starting block. Provide this for older contracts when the deployment is not recent.
to_blocknumber
Optional ending block. Defaults to the indexed head.
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "7d ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
search_depth_blocksnumber
When no explicit range is given, search this many recent blocks backward from the indexed head.
max_scan_blocksnumber
Safety cap for historical deployment scans. Default: scan the requested window up to 1,000,000 blocks.
scan_orderstring
Scan latest first for recent deployments, or earliest first when you provide a historical from_block.
portal_evm_get_contract_activity
Summarize what one specific contract has been doing lately, including recent interactions, unique callers, and optional event activity.
COMMON USER ASKS:
- Contract activity snapshot
FIRST CHOICE FOR:
- what one specific contract has been doing lately on an EVM network
WHEN TO USE:
- You want to ask "what has this contract been doing?" and get a contract-level answer.
- You want a contract-centric activity summary instead of raw records.
- You need top callers and interaction volume for one contract.
DON'T USE:
- You need the underlying raw logs or transactions.
- You want general recent network activity without naming one contract.
EXAMPLES:
- Contract activity snapshot: {"network":"base-mainnet","contract_address":"0xabc...","timeframe":"24h"}
Parameters (7)
networkstringrequired
Network name or alias
contract_addressstringrequired
Contract address to analyze
timeframestring
Analysis period as timeframe or block count. Examples: '1h', '24h', '7d', '3d', '1000'.
from_timestampstring | number
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampstring | number
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
include_eventsboolean
Include event log summary
modestring
Execution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews.
portal_evm_get_analytics
Get the big picture for network-wide EVM activity with ranked contracts and compact overview metrics.
COMMON USER ASKS:
- Top contracts on Base
FIRST CHOICE FOR:
- the big picture for activity on an EVM network like Base or Optimism
WHEN TO USE:
- You want the big picture for activity on an EVM network.
- You want the most active contracts on an EVM network.
- You want an analytics-style network overview instead of a raw record list.
DON'T USE:
- You need chart buckets over time rather than ranked entities.
EXAMPLES:
- Top contracts on Base: {"network":"base-mainnet","timeframe":"1h","limit":10}
Parameters (9)
networkstring
Network name (supports short names: 'ethereum', 'polygon', 'base', etc.). Optional when continuing with cursor.
num_blocksnumber
Number of recent blocks to analyze when timeframe is omitted (default: 50, max: 10000)
timeframestring
Optional natural time window like '1h' or '24h'
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
limitnumber
Number of top contracts to return (default: 10, max: 100)
include_detailsboolean
Include sample transaction hashes for each contract
modestring
Execution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews.
cursorstring
Continuation cursor from a previous response
portal_evm_get_ohlc
Build chart-ready EVM OHLC candles plus a recent trade tape from supported DEX event sources, including Uniswap v2-style swaps, Uniswap v3/v4, and Aerodrome Slipstream.
COMMON USER ASKS:
- Base Uniswap v2-style swap candles
- Base Uniswap candles
- Base Uniswap v4 candles
WHEN TO USE:
- You need OHLC candles for supported EVM event-derived price sources.
- You want a candle chart and recent trades instead of scalar time-series buckets.
- You want a Dexscreener-style pool chart with hover-ready candle metadata and a trade tape.
DON'T USE:
- You only need counts or scalar metrics over time.
- You want a simple activity chart for a network rather than pool candles.
EXAMPLES:
- Base Uniswap v2-style swap candles: {"network":"base-mainnet","source":"uniswap_v2_swap","pool_address":"0x<pool-address>","duration":"1h","interval":"5m","price_in":"auto","include_recent_trades":true}
- Base Uniswap candles: {"network":"base-mainnet","source":"uniswap_v3_swap","pool_address":"0x<pool-address>","duration":"1h","interval":"5m","price_in":"auto"}
- Base Uniswap v4 candles: {"network":"base-mainnet","source":"uniswap_v4_swap","pool_id":"0x<pool-id>","duration":"1h","interval":"5m","price_in":"auto","include_recent_trades":true}
- Base Aerodrome Slipstream candles: {"network":"base-mainnet","source":"aerodrome_slipstream_swap","pool_address":"0x<pool-address>","duration":"1h","interval":"5m","price_in":"token1"}
Parameters (24)
networkstring
EVM network name (default: base-mainnet)
pool_addressstring
Pool/pair contract address for address-keyed sources like Uniswap v3, Slipstream, or Sync-derived CPMM pools.
pool_idstring
Uniswap v4 pool id (bytes32). Optional when you provide the full v4 pool key instead.
pool_manager_addressstring
Uniswap v4 PoolManager address. Optional on networks with a built-in official Uniswap deployment mapping.
sourcestring
Which event source to build candles from. Prefer swap-derived sources for factual trade prices and volumes. Uniswap v4 uses PoolManager Swap events filtered by pool_id, not a per-pool contract address.
intervalstring
Candle interval. auto uses chart-friendly defaults like 1h→5m and 24h→1h.
durationstring
How much recent history to cover. Accepts compact durations like "1h" or natural phrases like "past 30 minutes".
modestring
Execution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews.
price_instring
Choose which token the displayed price should be expressed in. auto picks the more human-readable quote side.
Include a recent trade tape for swap-derived sources when factual per-trade amounts are available.
recent_trades_limitinteger
Maximum number of recent trades to return in the trade tape.
currency0_addressstring
Optional Uniswap v4 currency0 address. Use with currency1_address, fee, and tick_spacing to derive pool_id factually.
currency1_addressstring
Optional Uniswap v4 currency1 address. Use with currency0_address, fee, and tick_spacing to derive pool_id factually.
feeinteger
Optional Uniswap v4 LP fee in hundredths of a bip, e.g. 3000 for 0.30%.
tick_spacinginteger
Optional Uniswap v4 tick spacing. Required with the rest of the pool key when deriving pool_id.
hooks_addressstring
Optional Uniswap v4 hooks contract address. Defaults to the zero address when omitted.
token0_symbolstring
Optional token0 symbol label for summaries
token1_symbolstring
Optional token1 symbol label for summaries
token0_decimalsnumber
Optional token0 decimals for human-readable prices
token1_decimalsnumber
Optional token1 decimals for human-readable prices
token0_addressstring
Optional token0 address to infer known decimals
token1_addressstring
Optional token1 address to infer known decimals
cursorstring
Continuation cursor from a previous candle page
portal_solana_query_instructions
Query raw Solana instructions with program and account filters.
COMMON USER ASKS:
- Token Program instructions
WHEN TO USE:
- You need program-level or account-level instruction activity.
- You want to inspect Token Program, Jupiter, System Program, or Anchor discriminator activity.
DON'T USE:
- You only need transaction-level activity and not individual instructions.
EXAMPLES:
- Token Program instructions: {"network":"solana-mainnet","timeframe":"1h","program_id":["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],"limit":20}
Parameters (39)
networkstring
Network name or alias. Optional when continuing with cursor.
timeframestring
Time range (e.g., '1h', '24h'). Alternative to from_block/to_block. Solana slots are ~400ms.
from_blocknumber
Starting slot number (use this OR timeframe)
to_blocknumber
Ending slot number. Keep ranges reasonable for performance.
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
finalized_onlyboolean
Only query finalized slots
program_idany
Program IDs. You can pass a single string or an array.
d1any
1-byte discriminator filter (0x-prefixed hex). You can pass a single string or an array.
d2any
2-byte discriminator filter (0x-prefixed hex). You can pass a single string or an array.
d4any
4-byte discriminator filter (0x-prefixed hex). You can pass a single string or an array.
d8any
8-byte discriminator filter - Anchor (0x-prefixed hex). You can pass a single string or an array.
a0any
Account at index 0. You can pass a single string or an array.
a1any
Account at index 1. You can pass a single string or an array.
a2any
Account at index 2. You can pass a single string or an array.
a3any
Account at index 3. You can pass a single string or an array.
a4any
Account at index 4. You can pass a single string or an array.
a5any
Account at index 5. You can pass a single string or an array.
a6any
Account at index 6. You can pass a single string or an array.
a7any
Account at index 7. You can pass a single string or an array.
a8any
Account at index 8. You can pass a single string or an array.
a9any
Account at index 9. You can pass a single string or an array.
a10any
Account at index 10. You can pass a single string or an array.
a11any
Account at index 11. You can pass a single string or an array.
a12any
Account at index 12. You can pass a single string or an array.
a13any
Account at index 13. You can pass a single string or an array.
a14any
Account at index 14. You can pass a single string or an array.
a15any
Account at index 15. You can pass a single string or an array.
mentions_accountany
Accounts mentioned anywhere in the instruction. You can pass a single string or an array.
is_committedboolean
Only committed transactions
transaction_fee_payerany
Fee payer filter. You can pass a single string or an array.
limitnumber
Max instructions
include_transactionboolean
Include transaction data
include_transaction_balancesboolean
Include SOL balance changes
include_transaction_token_balancesboolean
Include token balance changes
include_inner_instructionsboolean
Include inner (CPI) instructions
include_logsboolean
Include program logs
include_transaction_instructionsboolean
Include all instructions from the parent transaction (sibling instructions)
cursorstring
Continuation cursor from a previous response
portal_solana_query_transactions
Query raw Solana transactions with optional balances, rewards, logs, and instruction context.
COMMON USER ASKS:
- Recent Solana transactions
- Filter by program
WHEN TO USE:
- You need raw Solana transaction records.
- You want Solana-specific filters or include flags that convenience tools do not expose.
DON'T USE:
- You only want recent activity or a compact network summary.
EXAMPLES:
- Recent Solana transactions: {"network":"solana-mainnet","timeframe":"1h","limit":20}
- Filter by program: {"network":"solana-mainnet","timeframe":"1h","program_id":["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],"limit":20}
Parameters (17)
networkstring
Network name or alias. Optional when continuing with cursor.
timeframestring
Time range (e.g., '1h', '24h'). Alternative to from_block/to_block.
from_blocknumber
Starting slot number (use this OR timeframe)
to_blocknumber
Ending slot number
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
finalized_onlyboolean
Only query finalized slots
fee_payerarray
Fee payer addresses
mentions_accountarray
Accounts mentioned anywhere in the transaction
include_instructionsboolean
Include instruction data
include_balancesboolean
Include SOL balance changes
include_token_balancesboolean
Include SPL token balance changes
include_logsboolean
Include program logs
include_rewardsboolean
Include block rewards (validator staking rewards). Filter by pubkey using mentions_account.
limitinteger
Max transactions to return (default: 50, max: 200)
response_formatstring
Response format: defaults to 'compact' for chat-friendly output, or stays 'full' when inline instruction, balance, log, or reward context is requested. Use 'summary' for aggregate stats.
cursorstring
Continuation cursor from a previous response
portal_solana_get_analytics
Get the big picture for Solana throughput, fees, wallet activity, and optional top-program usage.
COMMON USER ASKS:
- Solana network snapshot
- Include top programs
FIRST CHOICE FOR:
- the big picture for Solana right now
WHEN TO USE:
- You want the big picture for Solana right now.
- You want a network health snapshot for Solana.
- You want throughput, fee, success-rate, or top-program analytics rather than raw records.
DON'T USE:
- You want chart buckets or raw transaction/instruction records.
EXAMPLES:
- Solana network snapshot: {"network":"solana-mainnet","timeframe":"1h"}
- Include top programs: {"network":"solana-mainnet","timeframe":"1h","include_programs":true}
Parameters (10)
networkstring
Network name (default: solana-mainnet)
timeframestring
Time range. Accepts compact durations like '15m' or natural phrases like 'past 30 minutes'. Optional; defaults to a 1h analysis window.
modestring
Execution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews.
from_timestampstring | number
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampstring | number
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
include_compute_unitsboolean
Include average compute-unit stats across the full range (disabled by default for speed)
include_programsboolean
Include top programs by instruction count (requires an extra instruction scan and is slower)
program_limitnumber
Max top-program rows to return per page when include_programs is enabled
Query raw Bitcoin transactions and optionally attach inputs and outputs inline.
COMMON USER ASKS:
- Recent Bitcoin transactions
- Attach inputs and outputs
WHEN TO USE:
- You need raw Bitcoin transaction records.
- You want the UTXO envelope without switching to separate input/output tools.
DON'T USE:
- You only need a quick wallet or network summary.
EXAMPLES:
- Recent Bitcoin transactions: {"network":"bitcoin-mainnet","timeframe":"1h","limit":20}
- Attach inputs and outputs: {"network":"bitcoin-mainnet","timeframe":"1h","include_inputs":true,"include_outputs":true,"limit":10}
Parameters (12)
networkstring
Network name (default: bitcoin-mainnet). Optional when continuing with cursor.
from_blocknumber
Starting block number
to_blocknumber
Ending block number
timeframestring
Time range (e.g., '1h', '24h'). Alternative to from_block/to_block.
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
finalized_onlyboolean
Only query finalized blocks
include_inputsboolean
Attach transaction inputs inline
include_outputsboolean
Attach transaction outputs inline
response_formatstring
Response format: defaults to 'compact' for chat-friendly output. Compact mode keeps inline inputs and outputs in a smaller shape when requested.
limitinteger
Max transactions to return (default: 50, max: 200)
cursorstring
Continuation cursor from a previous response
portal_bitcoin_get_analytics
Get the big picture for Bitcoin block, fee, and address activity over a recent or explicit window.
COMMON USER ASKS:
- Bitcoin network snapshot
FIRST CHOICE FOR:
- the big picture for Bitcoin right now
WHEN TO USE:
- You want the big picture for Bitcoin right now.
- You want a network-level Bitcoin snapshot.
- You care about block cadence, fees, SegWit/Taproot adoption, or activity metrics.
DON'T USE:
- You need raw transactions rather than network analytics.
EXAMPLES:
- Bitcoin network snapshot: {"network":"bitcoin-mainnet","timeframe":"1h"}
Query raw Substrate or Polkadot event rows with pallet/event-name filters and optional parent call or extrinsic context.
COMMON USER ASKS:
- Balances.Transfer events on Polkadot
FIRST CHOICE FOR:
- raw Substrate or Polkadot event rows with optional parent call or extrinsic context
WHEN TO USE:
- You need raw event records on a Substrate network.
- You want pallet-level event activity like Balances.Transfer or Contracts.ContractEmitted.
- You want event rows first, even if the network is a Polkadot-family chain.
DON'T USE:
- You want calls or aggregate analytics rather than event rows.
EXAMPLES:
- Balances.Transfer events on Polkadot: {"network":"polkadot","timeframe":"1h","event_names":["Balances.Transfer"],"limit":20}
Parameters (14)
networkstring
Substrate network name or alias. Optional when continuing with cursor.
timeframestring
Time range (e.g. '1h', '24h'). Alternative to from_block/to_block.
from_blocknumber
Starting block number
to_blocknumber
Ending block number
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "6h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
finalized_onlyboolean
Only query finalized blocks
event_namesarray
Optional qualified event names like Balances.Transfer or System.ExtrinsicSuccess
include_extrinsicboolean
Attach the parent extrinsic inline for each matching event
include_callboolean
Attach the emitting call inline when the event has call context
include_stackboolean
Attach the parent call stack when the event has nested call context
response_formatstring
Response format: defaults to 'compact' for chat-friendly output. Compact mode keeps requested extrinsic or call context in a smaller inline shape.
limitnumber
Max events to return
cursorstring
Continuation cursor from a previous response
portal_substrate_query_calls
Query raw Substrate or Polkadot calls with pallet/call-name filters and optional child-call, emitted-event, or extrinsic context.
COMMON USER ASKS:
- Recent Balances calls
- Polkadot calls with emitted events
FIRST CHOICE FOR:
- raw Substrate or Polkadot call rows, especially when you want the events emitted by those calls
WHEN TO USE:
- You need raw call records on a Substrate network.
- You want pallet call activity like Balances.transfer_keep_alive or Ethereum.transact.
- You want calls plus the events emitted by those calls.
DON'T USE:
- You want events or aggregate analytics rather than call rows.
EXAMPLES:
- Recent Balances calls: {"network":"polkadot","timeframe":"1h","call_names":["Balances.transfer_keep_alive"],"limit":20}
- Polkadot calls with emitted events: {"network":"polkadot","timeframe":"1h","call_names":["ParaInherent.enter"],"include_events":true,"limit":20}
Parameters (15)
networkstring
Substrate network name or alias. Optional when continuing with cursor.
timeframestring
Time range (e.g. '1h', '24h'). Alternative to from_block/to_block.
from_blocknumber
Starting block number
to_blocknumber
Ending block number
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "6h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
finalized_onlyboolean
Only query finalized blocks
call_namesarray
Optional qualified call names like Timestamp.set or Balances.transfer_keep_alive
include_subcallsboolean
Attach direct descendant calls inline for each matching call
include_extrinsicboolean
Attach the parent extrinsic inline for each matching call
include_stackboolean
Attach the parent call stack for each matching call
include_eventsboolean
Attach events emitted directly by each matching call
response_formatstring
Response format: defaults to 'compact' for chat-friendly output. Compact mode keeps requested subcalls, events, and extrinsic context in a smaller inline shape.
limitnumber
Max calls to return
cursorstring
Continuation cursor from a previous response
portal_substrate_get_analytics
Analytics snapshot for Substrate or Polkadot activity in an indexed window, with event, call, and extrinsic counts plus top event and call names.
COMMON USER ASKS:
- Polkadot activity snapshot
- Big picture for Polkadot activity
- How is Polkadot doing?
FIRST CHOICE FOR:
- Polkadot activity analytics in an indexed window
- how Polkadot is doing in an indexed window
- analytics snapshot for Polkadot or another Substrate network in an indexed window
WHEN TO USE:
- You want Polkadot activity analytics in a selected indexed window.
- You want to ask "how is Polkadot doing in this indexed window?" and get an analytics answer rather than just network freshness metadata.
- You want a quick Substrate network snapshot or health check.
- You want top pallet events and calls rather than raw rows.
- You want to know how a Substrate network is doing in the selected indexed window.
DON'T USE:
- You need full raw event or call records.
EXAMPLES:
- Polkadot activity snapshot: {"network":"polkadot","timeframe":"1h"}
- Big picture for Polkadot activity: {"network":"polkadot","timeframe":"1h"}
- How is Polkadot doing?: {"network":"polkadot","timeframe":"6h"}
Parameters (9)
networkstring
Substrate network name (default: polkadot)
timeframestring
Time range like '1h', '6h', or '24h'. Default: '1h'
modestring
Execution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews.
from_blocknumber
Starting block number (use this OR timeframe)
to_blocknumber
Ending block number
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "6h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
Max rows to keep in ranked event and call sections
portal_hyperliquid_query_fills
Query raw individual Hyperliquid fills with trader, coin, fee, PnL, and builder context.
COMMON USER ASKS:
- Recent BTC fills
WHEN TO USE:
- You need raw fill records on Hyperliquid.
- You want to filter by trader, coin, direction, builder, or fee token.
DON'T USE:
- You want the big picture, top traders, grouped aggregates, or candles instead of raw fill rows.
EXAMPLES:
- Recent BTC fills: {"network":"hyperliquid-fills","timeframe":"1h","coin":["BTC"],"limit":20}
Parameters (18)
networkstring
Network name (default: 'hyperliquid-fills'). Optional when continuing with cursor.
timeframestring
Time range (e.g., '1h', '24h'). Alternative to from_block/to_block.
from_blocknumber
Starting block number (use this OR timeframe)
to_blocknumber
Ending block number
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
Response format: defaults to 'compact' for chat-friendly output. Use 'summary' for aggregate stats or 'full' when you truly need every fill field.
cursorstring
Continuation cursor from a previous response
portal_hyperliquid_get_analytics
Get the big-picture Hyperliquid fill analytics with top traders, volume by coin, fees, and PnL.
COMMON USER ASKS:
- Hyperliquid fill snapshot
- Who traded the most?
WHEN TO USE:
- You want network-level Hyperliquid fill analytics.
- You want to know who traded the most, which coins had volume, or how fees and PnL looked.
- You want grouped aggregate sections without stitching raw fills together yourself.
DON'T USE:
- You need individual fill records or OHLC candles.
EXAMPLES:
- Hyperliquid fill snapshot: {"network":"hyperliquid-fills","timeframe":"1h"}
- Who traded the most?: {"network":"hyperliquid-fills","timeframe":"1h"}
Parameters (9)
networkstring
Network name (default: 'hyperliquid-fills')
timeframestring
Time range: '1h', '6h', '24h'. Default: '1h'
modestring
Execution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews.
from_timestampstring | number
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "6h ago".
to_timestampstring | number
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
Per-section page size for ranked sections. Default: 6
cursorstring
Continuation cursor for ranked analytics sections
portal_hyperliquid_get_ohlc
Build chart-ready Hyperliquid trade OHLC candles with fixed buckets and auto intervals.
COMMON USER ASKS:
- BTC candles
WHEN TO USE:
- You want candles for one coin on Hyperliquid.
- You need chart-ready OHLC, volume, and VWAP data from fills.
DON'T USE:
- You want scalar time-series buckets or raw fills.
EXAMPLES:
- BTC candles: {"network":"hyperliquid-fills","coin":"BTC","duration":"6h","interval":"auto"}
Parameters (6)
networkstring
Network name (default: 'hyperliquid-fills')
coinstring
Asset symbol to build candles for (for example: "BTC", "ETH", "SOL"). Optional when continuing with cursor.
intervalstring
Candle interval. Use auto for chart-friendly defaults: 1h→5m, 6h→15m, 12h→30m, 24h→1h.
durationstring
How much recent trading history to cover. Accepts compact durations like "1h" or natural phrases like "past 30 minutes".
ADVANCED: Query raw block records directly for EVM, Solana, or Bitcoin.
COMMON USER ASKS:
- Recent Base blocks
WHEN TO USE:
- You are debugging Portal coverage or block-level fields.
- You need raw block records instead of transactions, logs, or summaries.
DON'T USE:
- You are answering a normal end-user question; prefer recent activity, time series, or raw transaction tools first.
EXAMPLES:
- Recent Base blocks: {"network":"base-mainnet","timeframe":"1h","limit":5}
Parameters (11)
networkstring
Network name or alias. Optional when continuing with cursor.
timeframestring
Time range (e.g., '1h', '24h'). Alternative to from_block/to_block.
from_blocknumber
Starting block number (use this OR timeframe)
to_blocknumber
Ending block number
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
finalized_onlyboolean
Only query finalized blocks
limitnumber
Max blocks to return (default: 20). Note: Lower default for MCP to reduce context usage.
include_l2_fieldsboolean
Include L2-specific fields (auto-detected for L2 chains)
field_presetstring
Field preset for EVM datasets: 'minimal' (number+timestamp+gas), 'standard' (+hash+miner+size), 'full' (all block fields). Ignored for Solana/Bitcoin.
cursorstring
Continuation cursor from a previous response
portal_debug_resolve_time_to_block
ADVANCED: Resolve a timestamp to the nearest indexed block or slot.
COMMON USER ASKS:
- Resolve one hour ago on Base
- Resolve an older time on Polkadot
WHEN TO USE:
- You are debugging timestamp windows or building a manual block-range query.
- You want to inspect exact versus estimated timestamp-to-block resolution.
DON'T USE:
- You just want to query by time; most public tools already accept natural timestamps directly.
EXAMPLES:
- Resolve one hour ago on Base: {"network":"base-mainnet","timestamp":"1h ago"}
- Resolve an older time on Polkadot: {"network":"polkadot","timestamp":"2026-04-08T12:00:00Z"}
Parameters (2)
networkstringrequired
Network name or alias
timestampnumber | stringrequired
Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago"
portal_debug_hyperliquid_query_replica_commands
ADVANCED: Query Hyperliquid replica-command actions such as orders, cancels, and leverage updates.
COMMON USER ASKS:
- Recent order actions
WHEN TO USE:
- You are debugging Hyperliquid replica-command records.
- You need raw order-action events instead of fills or analytics.
DON'T USE:
- You only need public trading activity; fills and analytics are usually the better fit.
EXAMPLES:
- Recent order actions: {"network":"hyperliquid-replica-cmds","timeframe":"1h","limit":20}
Parameters (13)
networkstring
Network name (default: 'hyperliquid-replica-cmds'). Optional when continuing with cursor.
timeframestring
Time range (e.g., '1h', '24h'). Alternative to from_block/to_block.
from_blocknumber
Starting block number (use this OR timeframe)
to_blocknumber
Ending block number
from_timestampnumber | string
Starting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
to_timestampnumber | string
Ending timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
Thin MCP wrapper around the SQD Portal API for blockchain data queries.
This server does not index chains itself. It validates user input, maps it onto Portal requests, and returns MCP-friendly responses.
Current public surface
25 public tools
3 advanced/debug tools
public params use network
discovery filters use vm
no legacy tool aliases in v0.7.9
Raw query tools default to compact responses. Ask for response_format: "full" only when you need the larger payload.
Entity questions can use portal_resolve_entity first. It resolves EVM token symbols/addresses, EVM contract aliases, pool identifiers, protocol names, and Hyperliquid coin names into query-ready filters while keeping ambiguous matches explicit.
Token symbol resolution and token metadata come from open token-list data, not baked-in token address constants. Responses include explicit notices when token-list data is unavailable, stale, or unsupported for a network.
Wallet questions should start with portal_get_wallet_summary. It returns fund_flow by default, including inbound/outbound movement, asset flows, counterparties, largest observed movements, and next evidence pivots before raw-tool drill-down.
Tool groups
Discovery:
portal_list_networks
portal_get_network_info
portal_get_head
portal_resolve_entity
Cross-chain convenience:
portal_get_recent_activity
portal_get_wallet_summary
portal_get_time_series
EVM:
portal_evm_query_transactions
portal_evm_query_logs
portal_evm_query_token_transfers
portal_evm_get_contract_deployment
portal_evm_get_contract_activity
portal_evm_get_analytics
portal_evm_get_ohlc
Solana:
portal_solana_query_transactions
portal_solana_query_instructions
portal_solana_get_analytics
Bitcoin:
portal_bitcoin_query_transactions
portal_bitcoin_get_analytics
Substrate:
portal_substrate_query_events
portal_substrate_query_calls
portal_substrate_get_analytics
Hyperliquid:
portal_hyperliquid_query_fills
portal_hyperliquid_get_analytics
portal_hyperliquid_get_ohlc
Advanced/debug:
portal_debug_query_blocks
portal_debug_resolve_time_to_block
portal_debug_hyperliquid_query_replica_commands
Supported data
EVM networks indexed by Portal, including Base, Ethereum, Optimism, Arbitrum, Monad, Hyperliquid EVM, and others
Solana mainnet
Bitcoin mainnet
Hyperliquid fills and replica commands
Substrate networks indexed by Portal
Substrate support is currently historical only. It does not have a real-time tail.
Response shape
Most tools return the same envelope in MCP structuredContent and in a compact JSON text fallback for older clients. The envelope contains a normal result body plus shared metadata such as:
answer
display
next_steps
investigation
_freshness
_coverage
_pagination
_ordering
investigation is a compact evidence guide for agents: it identifies the primary result path, bounded window, useful pivot fields such as addresses or transaction hashes, follow-up filters, and limitations before a result is treated as complete.
When a response uses estimated, partial, sampled, capped, or paginated data, the top-level answer and metadata disclose it. Safe pagination follow-ups include executable tool-call metadata with explicit cursor arguments; suggestions that cannot be reconstructed safely are marked non-executable.
Chart-oriented tools also return chart and table descriptors so MCP clients or LLMs can render them without reverse-engineering the payload.
The server does not ship its own frontend. It returns structured data and rendering hints for the client to use.
Install
bash
npm install
npm run build
Run
stdio:
bash
npm start
HTTP:
bash
npm run start:http
Developer discovery
The server exposes a structured tool-selection guide for client builders:
Open a new Codex thread after installing. First-use prompts include Hyperliquid BTC perp fills, recent Base transaction volume, and top USDC senders on Base.
Claude Code plugin
The Claude Code plugin uses the same hosted MCP endpoint and the same public selector:
bash
claude plugin marketplace add subsquid-labs/portal-mcp-server
claude plugin install portal@sqd
Open a new Claude Code session after installing so the SQD MCP tools are loaded.
Claude Desktop
Add an entry like this to claude_desktop_config.json:
If you do not know the exact network name, start with portal_list_networks.
If you need recent indexed state, use portal_get_network_info or portal_get_head first.
If the question is broad, start with portal_get_recent_activity, portal_get_wallet_summary, or portal_get_time_series before dropping to raw queries.
Time windows accept compact and natural wording such as 30m, past 30 minutes, in the past 1h, in last 38 mins, last hour, or 30 minutes ago.
Use portal_evm_get_ohlc and portal_hyperliquid_get_ohlc only when you actually need candle-shaped output.
For large or exploratory queries, prefer response_format: "compact" unless you need the full record shape.
HTTP Deployment Notes
HTTP mode exposes health state at /health and read-only tool discovery at /tools and /tools.json.
Set MCP_HTTP_BEARER_TOKEN to require Authorization: Bearer <token> for POST / and POST /mcp.
/health and read-only GET /tools / GET /tools.json remain public.
Set MCP_CURSOR_SECRET in production so pagination cursors are signed with a deployment-specific secret. Local development uses a deterministic fallback for convenience.
Useful environment variables:
MCP_HTTP_BEARER_TOKEN to protect HTTP MCP POSTs
MCP_CURSOR_SECRET to sign pagination cursors
Tests
bash
npm test
npm run test:tools
npm run test:routing
npm run test:substrate
npm run test:timestamps
npm run test:plugin
npm run test:conversations
npm run test:negative
npm run test:quality
npm run test:ci