Skip to main content

Parameters

object

Response

number
Current slot number

Code Examples

Basic Request

Request with Commitment

Using web3.js

Notes

  1. Returns the current slot of the node
  2. The slot number increases as new blocks are produced
  3. Different commitment levels can be specified
  4. The response is immediate as it reads from the current state
  5. The slot number is used for various time-based operations

Best Practices

  1. Cache the slot number when appropriate
  2. Consider using websocket subscription for real-time updates
  3. Handle network errors and retry when appropriate
  4. Use appropriate commitment level based on your needs
  5. Monitor slot progression for time-sensitive operations

Common Errors

Use Cases

  1. Slot Monitoring
  2. Slot Analysis
  3. Slot Synchronization