Overview
The Injective Indexer gRPC API provides indexed blockchain data and transaction utilities through two customer-facing services:
The Injective Indexer gRPC API is currently supported on Mainnet only.
injective_explorer_rpc.InjectiveExplorerRPCprovides blocks, transactions, validators, CosmWasm data, bridge transfers, bank transfers, statistics, and real-time block and transaction streams.injective_exchange_rpc.InjectiveExchangeRPCprovides transaction lookup, transaction preparation, broadcasting, and fee-payer utilities for Web3 and Cosmos transactions.
The Event Provider service is an internal dependency of the Explorer and Exchange services and is not part of this public API.
Endpoint and token configuration
Injective Indexer gRPC uses TLS on port 443. Your gRPC endpoint name and authentication token come from the HTTP Provider URL shown on your Quicknode endpoint page.
Given this provider URL:
https://YOUR_ENDPOINT_NAME.injective-mainnet.quiknode.pro/YOUR_TOKEN/
extract the following values:
Endpoint name: YOUR_ENDPOINT_NAME
gRPC endpoint: YOUR_ENDPOINT_NAME.injective-mainnet.quiknode.pro:443
Token: YOUR_TOKEN
Do not include https:// or the token path in the gRPC endpoint. The token is sent separately as request metadata.
Authentication
Injective Indexer gRPC uses x-token authentication. Send the token in the x-token metadata field with every request.
All code examples in this reference use x-token. Keep credentials in environment variables or a secrets manager rather than committing them to source control.
You can verify x-token authentication with grpcurl:
export QN_GRPC_ENDPOINT="YOUR_ENDPOINT_NAME.injective-mainnet.quiknode.pro:443"
export QN_TOKEN="YOUR_TOKEN"
grpcurl \
-H "x-token: ${QN_TOKEN}" \
"${QN_GRPC_ENDPOINT}" \
list injective_explorer_rpc.InjectiveExplorerRPC
Protocol Buffer definitions
Generate client code from the official Injective proto definitions:
See the setup guides for Go, Node.js, and Python.
Explorer API
The Explorer service contains 26 methods, including four deprecated methods retained for compatibility and two open-ended server streams.
| Method | Description | Proto definition |
|---|---|---|
GetBlock | Returns an indexed block by height or hash. | Explorer proto |
GetBlocks | Returns indexed blocks using offset pagination. Deprecated: use GetBlocksV2 instead. | Explorer proto |
GetBlocksV2 | Returns cursor-paginated indexed blocks. | Explorer proto |
GetStats | Returns global Injective exchange and blockchain statistics. | Explorer proto |
StreamBlocks | Streams newly indexed Injective blocks in real time. | Explorer proto |
GetAccountTxs | Returns transactions involving an account. Deprecated: use GetAccountTxsV2 instead. | Explorer proto |
GetAccountTxsV2 | Returns cursor-paginated transactions involving an account. | Explorer proto |
GetBankTransfers | Returns indexed bank transfers. | Explorer proto |
GetContractTxs | Returns transactions involving a contract. Deprecated: use GetContractTxsV2 instead. | Explorer proto |
GetContractTxsV2 | Returns cursor-paginated transactions involving a contract. | Explorer proto |
GetIBCTransferTxs | Returns indexed IBC transfer transactions. | Explorer proto |
GetPeggyDepositTxs | Returns indexed Peggy bridge deposit transactions. | Explorer proto |
GetPeggyWithdrawalTxs | Returns indexed Peggy bridge withdrawal transactions. | Explorer proto |
GetTxByTxHash | Returns indexed transaction details for a transaction hash. | Explorer proto |
GetTxs | Returns indexed transactions using offset pagination. Deprecated: use GetTxsV2 instead. | Explorer proto |
GetTxsV2 | Returns cursor-paginated indexed transactions. | Explorer proto |
StreamTxs | Streams newly indexed Injective transactions in real time. | Explorer proto |
GetValidator | Returns information for an Injective validator. | Explorer proto |
GetValidators | Returns validators on the active Injective chain. | Explorer proto |
GetValidatorUptime | Returns recent uptime records for an Injective validator. | Explorer proto |
GetCw20Balance | Returns indexed CW20 balances for an Injective account. | Explorer proto |
GetWasmCodeByID | Returns a stored CosmWasm code record by code ID. | Explorer proto |
GetWasmCodes | Returns stored CosmWasm code records. | Explorer proto |
GetWasmContractByAddress | Returns an indexed CosmWasm contract by address. | Explorer proto |
GetWasmContracts | Returns indexed CosmWasm contracts. | Explorer proto |
Relayers | Returns relayers associated with the requested market IDs. | Explorer proto |
Exchange API
The Exchange service contains eight methods:
| Method | Description | Proto definition |
|---|---|---|
GetTx | Returns transaction execution details for a Cosmos-style transaction hash. | Exchange proto |
GetFeePayer | Returns the configured fee-payer address and public key. | Exchange proto |
PrepareTx | Builds an EIP-712-signable payload for an Injective Web3 transaction. | Exchange proto |
PrepareEip712 | Builds EIP-712 typed data for an Injective transaction. | Exchange proto |
PrepareCosmosTx | Builds a protobuf-encoded Injective Cosmos transaction for signing. | Exchange proto |
BroadcastTx | Broadcasts a signed Injective Web3 transaction. | Exchange proto |
BroadcastCosmosTx | Broadcasts a signed Injective Cosmos transaction. | Exchange proto |
PrepareFeeGrant | Creates or refreshes a fee grant for a grantee address. | Exchange proto |
Start building
Choose a setup guide to generate a client, configure your Quicknode endpoint and x-token, and make your first Injective Indexer gRPC request:
After completing the setup, select an Explorer or Exchange method above to view its parameters, return fields, and runnable code examples.