Search
⌘K
Solana
Solana gRPC
Methods
accountSubscribe
accountUnsubscribe
blockSubscribe
blockUnsubscribe
getAccountInfo
getBalance
getBlock
getBlockCommitment
getBlockHeight
getBlockProduction
getBlocks
getBlocksWithLimit
getBlockTime
getClusterNodes
getConfirmedBlock
getConfirmedBlocks
getConfirmedTransaction
getDelegateStakeAccounts
getEpochInfo
getEpochSchedule
getFeeCalculatorForBlockhash
getFeeForMessage
getFees
getFirstAvailableBlock
getGenesisHash
getHealth
getHighestSnapshotSlot
getIdentity
getInflationGovernor
getInflationRate
getInflationReward
getLargestAccounts
getLatestBlockhash
getLeaderSchedule
getMaxRetransmitSlot
getMaxShredInsertSlot
getMinimumBalanceForRentExemption
getMultipleAccounts
getProgramAccounts
getRecentPerformanceSamples
getRecentPrioritizationFees
getSignaturesForAddress
getSignatureStatuses
getSlot
getSlotLeader
getSlotLeaders
getStakeActivation
getStakeMinimumDelegation
getSupply
getTokenAccountBalance
getTokenAccountsByDelegate
getTokenAccountsByOwner
getTokenLargestAccounts
getTokenSupply
getTransaction
getTransactionCount
getVersion
getVoteAccounts
isBlockhashValid
logsSubscribe
logUnsubscribe
minimumLedgerSlot
requestAirdrop
programSubscribe
rootSubscribe
sendTransaction
signatureSubscribe
signatureUnsubscribe
simulateBundle
simulateTransaction
slotSubscribe
slotUnsubscribe
voteSubscribe
Docs·APIs·Web3 RPC API·Solana·Methods·getEpochInfo

getEpochInfo

Returns information about the current epoch.

https://api.1inch.com/web3/501

Request

Request
object
jsonrpc
* string (Enum)
2.0
method
* string
params
array
items
any
id
* number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const response = await fetch('https://api.1inch.com/web3/501', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${API_KEY}`,
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'getEpochInfo',
    params: [],
    id: 1,
  }),
});

const data = await response.json();
console.log(data);

Response

Epoch Info Response

Epoch Info Response
object
absoluteSlot
* integer
blockHeight
* integer
epoch
* integer
slotIndex
* integer
slotsInEpoch
* integer
transactionCount
any
oneOf[0]
null
oneOf[1]
integer
additionalProperties
none
JSON
1
2
3
4
5
6
7
8
9
{
  "absoluteSlot": 166598,
  "blockHeight": 166500,
  "epoch": 27,
  "slotIndex": 2790,
  "slotsInEpoch": 8192,
  "transactionCount": 22661093
}

Did you find what you need?