API Reference
REST API endpoints and WebSocket events for FlowIndex.
The FlowIndex API is served by the backend on port 8080 by default. All endpoints return JSON and support CORS.
API routes are available under the /flow/v1/ prefix (also accessible at /api/v1/flow/v1/ for compatibility).
Base Endpoints
Health Check
GET /healthReturns the service health status.
{"status": "ok"}Indexing Status
GET /statusReturns comprehensive indexing status including block heights, worker progress, and configuration.
Query parameters:
| Parameter | Type | Description |
|---|---|---|
include_ranges | boolean | Include indexed block ranges (heavier query) |
Response:
{
"chain_id": "flow",
"latest_height": 142610500,
"indexed_height": 142610498,
"history_height": 85000000,
"min_height": 85000000,
"max_height": 142610498,
"total_blocks": 57610498,
"total_transactions": 450000000,
"total_events": 2100000000,
"total_addresses": 35000000,
"total_contracts": 12000,
"progress": "99.98%",
"behind": 2,
"status": "ok"
}OpenAPI Specification
GET /openapi.yaml
GET /openapi.jsonReturns the OpenAPI specification in YAML or JSON format.
Blocks
List Blocks
GET /flow/block| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of blocks to return (default: 20, max: 100) |
cursor | string | Pagination cursor (block height) |
Example response:
{
"data": [
{
"height": 142610500,
"id": "abc123...",
"parent_id": "def456...",
"timestamp": "2025-01-15T12:00:00Z",
"tx_count": 15,
"event_count": 120
}
],
"has_more": true,
"cursor": "142610480"
}Get Block
GET /flow/block/{height}Returns a single block by height, including collections and transaction summaries.
Block Transactions
GET /flow/block/{height}/transactionReturns all transactions in a block.
Block Service Events
GET /flow/block/{height}/service-eventReturns system service events for a block (epoch transitions, protocol state changes).
Transactions
List Transactions
GET /flow/transaction| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of results (default: 20) |
cursor | string | Pagination cursor (block_height:tx_index:tx_id) |
Get Transaction
GET /flow/transaction/{id}Returns a single transaction by its Flow transaction ID. Also resolves EVM transaction hashes.
Accounts
List Accounts
GET /flow/accountGet Account
GET /flow/account/{address}Returns account details including balance, key count, contract count, and labels.
Account Transactions
GET /flow/account/{address}/transactionReturns transactions involving the given address (as payer, proposer, or authorizer).
Account FT Vaults
GET /flow/account/{address}/ftReturns all fungible token vaults (balances) for an account.
Account FT Transfers
GET /flow/account/{address}/ft/transferAccount NFT Collections
GET /flow/account/{address}/nftAccount NFT Transfers
GET /flow/account/{address}/nft/transferAccount Balance History
GET /flow/account/{address}/balance/historyAccount Storage
GET /flow/account/{address}/storageReturns the account's on-chain storage contents.
Account Contract Code
GET /flow/account/{address}/contract/{name}Returns the source code of a specific contract deployed to the account.
Account Labels
GET /flow/account/{address}/labelsReturns known labels/tags for the account (e.g., exchange, service, etc.).
Tax Report
GET /flow/account/{address}/tax-reportGenerates a tax report for the account's token activity.
Fungible Tokens
List FT Tokens
GET /flow/ftReturns all known fungible tokens with metadata (name, symbol, decimals, icon).
Get FT Token
GET /flow/ft/{token}FT Transfers
GET /flow/ft/transferGlobal fungible token transfer feed.
FT Token Stats
GET /flow/ft/statsFT Token Prices
GET /flow/ft/pricesFT Holdings by Token
GET /flow/ft/{token}/holdingTop FT Accounts
GET /flow/ft/{token}/top-accountNFTs
List NFT Collections
GET /flow/nftGet NFT Collection
GET /flow/nft/{nft_type}NFT Transfers
GET /flow/nft/transferGlobal NFT transfer feed.
NFT Collection Items
GET /flow/nft/{nft_type}/itemNFT Item Detail
GET /flow/nft/{nft_type}/item/{id}NFT Item Transfers
GET /flow/nft/{nft_type}/item/{id}/transferNFT Search
GET /flow/nft/searchContracts
List Contracts
GET /flow/contractGet Contract
GET /flow/contract/{identifier}The identifier format is A.{address}.{name} (e.g., A.1654653399040a61.FlowToken).
Contract Transactions
GET /flow/contract/{identifier}/transactionContract Event Types
GET /flow/contract/{identifier}/eventsContract Versions
GET /flow/contract/{identifier}/versionContract Dependencies
GET /flow/contract/{identifier}/dependenciesEVM
List EVM Transactions
GET /flow/evm/transactionGet EVM Transaction
GET /flow/evm/transaction/{hash}Look up an EVM transaction by its EVM hash. Returns both the EVM details and the parent Cadence transaction.
List EVM Tokens
GET /flow/evm/tokenGet EVM Token
GET /flow/evm/token/{address}EVM Address Tokens
GET /flow/evm/address/{address}/tokenStaking
List Nodes
GET /flow/nodeGet Node
GET /flow/node/{node_id}Staking Delegators
GET /staking/delegatorEpoch Stats
GET /staking/epoch/statsEpoch Nodes
GET /staking/epoch/{epoch}/nodesStaking Rewards
GET /staking/rewards/paid
GET /staking/rewards/stakingStaking Tokenomics
GET /staking/tokenomicsDeFi
List DeFi Assets
GET /defi/assetList DeFi Pairs
GET /defi/pairDeFi Events
GET /defi/eventsLatest DeFi Swap
GET /defi/latest-swapAnalytics
Daily Metrics
GET /insights/dailyReturns daily aggregate metrics (transactions, accounts, events).
Daily Module Metrics
GET /insights/daily/module/{module}Transfer Analytics
GET /insights/transfers/dailyBig Transfers
GET /insights/big-transfersTop Contracts
GET /insights/top-contractsToken Volume
GET /insights/token-volumeNetwork Status
Network Statistics
GET /status/stat
GET /status/stat/{timescale}/trendFlow Statistics
GET /status/flow/statEpoch Status
GET /status/epoch/status
GET /status/epoch/statPrice Data
GET /status/price
GET /status/price/at
GET /status/price/history
GET /status/pricesNode Count
GET /status/nodesEvents
Search Events
GET /flow/events/searchSearch for events by type across all indexed blocks.
Public Key Lookup
GET /flow/key/{publicKey}Find accounts associated with a given public key.
COA (Cadence-Owned Account) Mapping
GET /flow/coa/{address}Look up the COA mapping for a Flow-EVM address.
WebSocket
Live Updates
ws://localhost:8080/wsConnect to receive real-time broadcasts of new blocks and transactions. Messages are JSON-encoded with a type field:
new_block
Broadcast when a new block is indexed.
{
"type": "new_block",
"payload": {
"height": 142610500,
"id": "abc123...",
"timestamp": "2025-01-15T12:00:00Z",
"tx_count": 15,
"event_count": 120
}
}new_transaction
Broadcast for each transaction in a new block.
{
"type": "new_transaction",
"payload": {
"id": "def456...",
"block_height": 142610500,
"status": "SEALED",
"payer_address": "e467b9dd11fa00df",
"proposer_address": "e467b9dd11fa00df",
"timestamp": "2025-01-15T12:00:00Z",
"execution_status": "SUCCESS",
"is_evm": false,
"script_hash": "a1b2c3...",
"template_category": "token_transfer",
"template_label": "Transfer FLOW",
"tags": ["FT_TRANSFER"]
}
}Status WebSocket
ws://localhost:8080/ws/statusStreams the indexing status payload every 3 seconds (same format as GET /status).
Pagination
All list endpoints use cursor-based pagination. The response includes:
| Field | Type | Description |
|---|---|---|
data | array | Result items |
has_more | boolean | Whether more results exist |
cursor | string | Pass as ?cursor= to get the next page |
Cursor formats vary by endpoint:
- Blocks:
height - Transactions:
block_height:tx_index:tx_id - Account transactions:
block_height:tx_id - Token transfers:
block_height:tx_id:event_index