Sei
Sei API is available on Web3 API platform.
Sei is a general purpose, open-source Layer 1 blockchain specialized for the exchange of digital assets. Sei has only one value prop: exchange apps — whether it’s an NFT marketplace or gaming economy — Sei offers the best user experience to build upon.
We support the following networks and protocols for Sei:
Currently, we provide two interfaces to query Sei API — JSON-RPC and REST. Responses for both of them come in JSON format.
Here is the request/response structure to use for querying:
- Tendermint JSON-RPC request
- Tendermint REST request
- Cosmos REST request
- JSON response
curl -X POST https://rpc.ankr.com/sei/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block",
"params": ["1"],
"id": 1
}'
curl https://rpc.ankr.com/premium-http/sei/YOUR_ANKR_API_KEY/block?height=1
curl https://rpc.ankr.com/premium-http/sei_cosmos/YOUR_ANKR_API_KEY/cosmos/base/tendermint/v1beta1/blocks/{height}
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"block": {
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"data": [
"yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
],
"evidence": [
{
"type": "string",
"height": 0,
"time": 0,
"total_voting_power": 0,
"validator": {
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
},
"voting_power": 0,
"address": "string"
}
}
],
"last_commit": {
"height": 0,
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"signatures": [
{
"type": 2,
"height": "1262085",
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"timestamp": "2019-08-01T11:39:38.867269833Z",
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"validator_index": 0,
"signature": "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
}
]
}
}
}
}
EVM JSON-RPC methods
web3_clientVersion— returns the current client version.net_version— returns the current network ID.eth_gasPrice— returns the current price per gas in wei.eth_accounts— returns a list of addresses owned by client.eth_blockNumber— returns the number of most recent block.eth_getBalance— returns the balance of the account specified by address.eth_getStorageAt— returns the value from a storage position at an address specified.eth_getTransactionCount— returns the number of transactions sent from an address.eth_getBlockTransactionCountByHash— returns the number of transactions in a block specified by block hash.eth_getBlockTransactionCountByNumber— returns the number of transactions in the block specified by number.eth_getUncleCountByBlockNumber— returns the number of uncles in a block specified by block number.eth_getCode— returns code at an address specified.eth_sendRawTransaction— creates a new message call transaction or a contract creation for signed transactions.eth_call— executes a new message call immediately without creating a transaction on the blockchain.eth_estimateGas— generates and returns an estimate of how much gas is necessary to allow the transaction to complete.eth_getBlockByHash— returns information for the block specified by block hash.eth_getBlockByNumber— returns information for the block specified by block number.eth_getTransactionByHash— returns information on a transaction specified by transaction hash.eth_getTransactionByBlockHashAndIndex— returns information on a transaction specified by block hash and transaction index position.eth_getTransactionByBlockNumberAndIndex— returns information on a transaction by block number and transaction index position.eth_getTransactionReceipt— returns the receipt of a transaction by transaction hash.eth_getLogs— returns logs matching the parameters specified.
Tendermint JSON-RPC/REST methods
Info — node information:
status— retrieves Tendermint status including node info, pubkey, latest block hash, app hash, block height and time.net_info— retrieves network info.blockchain— retrieves block headers (max: 20) forminHeight <= height <= maxHeight.block— retrieves a block at a specified height.block_by_hash— retrieves a block by hash.block_results— retrieves block results at a specified height.commit— retrieves commit results at a specified height.validators— retrieves a validator set at a specified height.genesis_chunked— retrieves the Genesis in multiple chunks.dump_consensus_state— retrieves consensus state.consensus_state— retrieves consensus state.consensus_params— retrieves consensus parameters.unconfirmed_txs— retrieves the list of unconfirmed transactions.num_unconfirmed_txs— retrieves data about unconfirmed transactions.tx_search— searches for transactions.block_search— searches for blocks byBeginBlockandEndBlockevents.tx— retrieves transactions by hash.
Tx — transactions broadcast information:
broadcast_tx_sync— returns with the response fromCheckTx. Does not wait forDeliverTxresult.broadcast_tx_async— returns right away, with no response. Does not wait forCheckTxnorDeliverTxresults.broadcast_tx_commit— returns with the responses fromCheckTxandDeliverTx.check_tx— checks the transaction without executing it.
ABCI — ABCI info:
abci_info— retrieves info about the application.abci_query— queries the application for some information.
Cosmos REST methods
Gaia REST:
/node_info— retrieves the properties of the connected node.
Transactions:
/txs— broadcasts a signed transaction to a full node.
Staking:
/staking/delegators/{delegatorAddr}/delegations— submits a delegation./staking/delegators/{delegatorAddr}/unbonding_delegations— submits an unbonding delegation.
Query:
/cosmos/auth/v1beta1/accounts— retrieves all the existing accounts./cosmos/auth/v1beta1/accounts/{address}— retrieves account details based on address./cosmos/auth/v1beta1/params— retrieves all parameters./cosmos/bank/v1beta1/balances/{address}— retrieves the balance of all coins for a single account./cosmos/bank/v1beta1/balances/{address}/{denom}— retrieves the balance of a single coin for a single account./cosmos/bank/v1beta1/denoms_metadata— retrieves the client metadata for all registered coin denominations./cosmos/bank/v1beta1/denoms_metadata/{denom}— retrieves the client metadata of a given coin denomination./cosmos/bank/v1beta1/params— retrieves the parameters of x/bank module./cosmos/bank/v1beta1/supply— retrieves the total supply of all coins./cosmos/bank/v1beta1/supply/{denom}— retrieves the supply of a single coin./cosmos/distribution/v1beta1/community_pool— retrieves the community pool coins./cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards— retrieves the total rewards accrued by each validator./cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}— retrieves the total rewards accrued by a delegation./cosmos/distribution/v1beta1/delegators/{delegator_address}/validators— retrieves the validators of a delegator./cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address— retrieves a withdrawal address of a delegator./cosmos/distribution/v1beta1/params— retrieves parameters of the distribution module./cosmos/distribution/v1beta1/validators/{validator_address}/commission— retrieves accumulated commission for a validator./cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards— retrieves rewards of a validator address./cosmos/distribution/v1beta1/validators/{validator_address}/slashes— retrieves slash events of a validator./cosmos/evidence/v1beta1/evidence— retrieves all evidence./cosmos/evidence/v1beta1/evidence/{evidence_hash}— retrieves evidence based on evidence hash./cosmos/gov/v1beta1/params/{params_type}— retrieves all parameters of the gov module./cosmos/gov/v1beta1/proposals— retrieves all proposals based on given status./cosmos/gov/v1beta1/proposals/{proposal_id}— retrieves proposal details based on proposal ID./cosmos/gov/v1beta1/proposals/{proposal_id}/deposits— retrieves all deposits of a single proposal./cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}— retrieves single deposit information based on proposal ID and deposit address./cosmos/gov/v1beta1/proposals/{proposal_id}/tally— retrieves the tally of a proposal vote./cosmos/gov/v1beta1/proposals/{proposal_id}/votes— retrieves votes of a given proposal./cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}— retrieves voted information based on proposal ID and voter address./cosmos/mint/v1beta1/annual_provisions— retrieves the current minting annual provisions value./cosmos/mint/v1beta1/inflation— retrieves the current minting inflation value./cosmos/mint/v1beta1/params— retrieves the total set of minting parameters./cosmos/params/v1beta1/params— retrieves a specific parameter of a module, given its subspace and key./cosmos/slashing/v1beta1/params— retrieves the parameters of a slashing module./cosmos/slashing/v1beta1/signing_infos— retrieves signing info of all validators./cosmos/slashing/v1beta1/signing_infos/{cons_address}— retrieves the signing info of given cons address./cosmos/staking/v1beta1/delegations/{delegator_addr}— retrieves all delegations of a given delegator address./cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations— retrieves redelegations of a given address./cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations— retrieves all unbonding delegations of a given delegator address./cosmos/staking/v1beta1/delegators/{delegator_addr}/validators— retrieves all validators info for a given delegator address./cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}— retrieves validator info by given delegator validator pair./cosmos/staking/v1beta1/historical_info/{height}— retrieves the historical info for a given height./cosmos/staking/v1beta1/params— retrieves the staking parameters./cosmos/staking/v1beta1/pool— retrieves the pool info./cosmos/staking/v1beta1/validators— retrieves all validators that match the given status./cosmos/staking/v1beta1/validators/{validator_addr}— retrieves validator info for a given validator address./cosmos/staking/v1beta1/validators/{validator_addr}/delegations— retrieves delegate info for a given validator./cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}— retrieves delegate info for given validator delegator pair./cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation— retrieves unbonding info for given validator delegator pair./cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations— retrieves unbonding delegations of a given validator address./cosmos/upgrade/v1beta1/applied_plan/{name}— retrieves a previously applied upgrade plan by its name./cosmos/upgrade/v1beta1/current_plan— retrieves the current upgrade plan./cosmos/upgrade/v1beta1/module_versions— retrieves the list of module versions from state./cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}— retrieves the consensus state that will serve as a trusted kernel for the next version of this chain./cosmos/authz/v1beta1/grants— retrieves the list ofAuthorization, granted to the grantee by the granter./cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}— retrieves the fee granted to the grantee by the granter./cosmos/feegrant/v1beta1/allowances/{grantee}— retrieves all the grants for an address.
Services:
/cosmos/base/tendermint/v1beta1/blocks/latest— retrieves the latest block./cosmos/base/tendermint/v1beta1/blocks/{height}— retrieves the block for a given height./cosmos/base/tendermint/v1beta1/node_info— retrieves the current node info./cosmos/base/tendermint/v1beta1/syncing— retrieves a node syncing state./cosmos/base/tendermint/v1beta1/validatorsets/latest— retrieves the latest validator-set./cosmos/base/tendermint/v1beta1/validatorsets/{height}— retrieves the validator-set at a given height./cosmos/tx/v1beta1/simulate— simulates executing a transaction to estimate gas usage./cosmos/tx/v1beta1/txs— retrieves transactions by event./cosmos/tx/v1beta1/txs— broadcasts a transaction./cosmos/tx/v1beta1/txs/{hash}— retrieves a transaction by hash.
Methods
Methods, Information
web3_clientVersionnet_versioneth_gasPriceeth_accountseth_blockNumbereth_getBalanceeth_getStorageAteth_getTransactionCounteth_getBlockTransactionCountByHasheth_getBlockTransactionCountByNumbereth_getCodeeth_sendRawTransactioneth_calleth_estimateGaseth_getBlockByHasheth_getBlockByNumbereth_getTransactionByHasheth_getTransactionByBlockHashAndIndexeth_getTransactionByBlockNumberAndIndexeth_getTransactionReceipteth_getLogsstatus
Information, Transactions, ABCI, Gaia REST, Staking, Query
net_infoblockchainblockblock_by_hashblock_resultscommitvalidatorsgenesis_chunkeddump_consensus_stateconsensus_stateconsensus_paramsunconfirmed_txsnum_unconfirmed_txstx_searchblock_searchtxbroadcast_tx_syncParametersbroadcast_tx_asyncbroadcast_tx_commitcheck_txabci_infoabci_query/node_info/txs/staking/delegators/{delegatorAddr}/delegations/staking/delegators/{delegatorAddr}/unbonding_delegations/cosmos/auth/v1beta1/accounts/cosmos/auth/v1beta1/accounts/{address}/cosmos/auth/v1beta1/params
Query
/cosmos/bank/v1beta1/balances/{address}/cosmos/bank/v1beta1/balances/{address}/{denom}/cosmos/bank/v1beta1/denom_owners/{denom}/cosmos/bank/v1beta1/denoms_metadata/cosmos/bank/v1beta1/denoms_metadata/{denom}/cosmos/bank/v1beta1/params/cosmos/bank/v1beta1/supply/cosmos/bank/v1beta1/supply/{denom}/cosmos/distribution/v1beta1/community_pool/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address/cosmos/distribution/v1beta1/params/cosmos/distribution/v1beta1/validators/{validator_address}/commission/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards/cosmos/distribution/v1beta1/validators/{validator_address}/slashes/cosmos/evidence/v1beta1/evidence/cosmos/evidence/v1beta1/evidence/{evidence_hash}/cosmos/gov/v1beta1/params/{params_type}/cosmos/gov/v1beta1/proposals/cosmos/gov/v1beta1/proposals/{proposal_id}/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}/cosmos/gov/v1beta1/proposals/{proposal_id}/tally/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}/cosmos/mint/v1beta1/annual_provisionsResponse example/cosmos/mint/v1beta1/inflation/cosmos/mint/v1beta1/params/cosmos/params/v1beta1/params/cosmos/slashing/v1beta1/params/cosmos/slashing/v1beta1/signing_infos/cosmos/slashing/v1beta1/signing_infos/{cons_address}/cosmos/staking/v1beta1/delegations/{delegator_addr}/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}/cosmos/staking/v1beta1/historical_info/{height}/cosmos/staking/v1beta1/params/cosmos/staking/v1beta1/pool/cosmos/staking/v1beta1/validators/cosmos/staking/v1beta1/validators/{validator_addr}/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations/cosmos/upgrade/v1beta1/applied_plan/{name}/cosmos/upgrade/v1beta1/current_plan/cosmos/upgrade/v1beta1/module_versions/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}/cosmos/authz/v1beta1/grants/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}/cosmos/feegrant/v1beta1/allowances/{grantee}
Services
/cosmos/base/tendermint/v1beta1/blocks/latest/cosmos/base/tendermint/v1beta1/blocks/{height}/cosmos/base/tendermint/v1beta1/node_info/cosmos/base/tendermint/v1beta1/syncing/cosmos/base/tendermint/v1beta1/validatorsets/latest/cosmos/base/tendermint/v1beta1/validatorsets/{height}/cosmos/tx/v1beta1/simulate/cosmos/tx/v1beta1/txs/cosmos/tx/v1beta1/txs/cosmos/tx/v1beta1/txs/{hash}