IoTeX gRPC API

When running in "Gateway" mode, an IoTeX node exposes both the IoTeX native API and the Ethereum JSON API. The IoTeX native API is based on the gRPC protocol. In this document, we list the official IoTeX public gateway nodes exposing the gRPC API and the API calls reference.

Official gRPC API endpoints

Mainnet

Endpoint
Provider
More

api.iotex.one:443

IoTeX Foundation

api.mainnet.iotex.one:443

IoTeX Foundation

Testnet

Endpoint
Text
More

api.testnet.iotex.one:443

IoTeX Foundation

gRPC API Reference

Below is the alphabetical list of all available gRPC calls provided by the IoTeX native API. To run the examples you can use the grpcurl command-line client for your OS.

If you are accessing a non-TLS endpoint, make sure you use -plaintext option in your grpcurl command.

EstimateActionGasConsumptionByExecution

Usage: 
Get Estimated Action Gas Consumption By Execution
Request: 
  Execution: iotextypes.Execution 
    -Amount: Execution Amount 
    -Contract: Contract Address 
    -Data: Data 
  CallerAddress: Address of Caller

Response: 
  Gas: Estimated Gas Amount

Example:

EstimateActionGasConsumptionByTransfer

Example:

EstimateGasForAction

Example:

GetAccount

Example:

GetActionsByAddress

Example:

GetActionsByBlock

Example:

GetActionByHash

Example:

GetActionsByIndex

Example:

GetBlockMetasByHash

Example:

GetBlockMetasByIndex

Example:

GetChainMeta

Example:

GetEpochMeta

Example:

GetLogsByBlock

Example:

GetLogsByRange

Example:

GetRawBlocks

Example:

GetReceiptByAction

Example:

GetServerMeta

Example:

GetTransactionLogByActionHash

Example:

GetTransactionLogByBlockHeight

Example:

GetUnconfirmedActionsByAddress

Example:

ReadContract

Example:

ReadState

Example:

SendAction

Example:

SuggestGasPrice

Example:

StreamBlocks

Example:

StreamLogs

Example: