---
updatedAt: 2026-03-05T10:56:24.000Z
agentTools:
  projectIndex: https://docs.tatum.io/llms.txt
---

# getBlocks - Solana

Returns a list of confirmed blocks between two slots.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Getting Blocks - Solana",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{solana-network}.gateway.tatum.io",
      "description": "RPC Gateway - Recommended",
      "variables": {
        "solana-network": {
          "enum": [
            "solana-mainnet",
            "solana-devnet"
          ],
          "default": "solana-mainnet"
        }
      }
    },
    {
      "url": "https://api.tatum.io/v3/blockchain/node/{solana-network}",
      "description": "Deprecated",
      "variables": {
        "solana-network": {
          "enum": [
            "solana-mainnet",
            "solana-devnet"
          ],
          "default": "solana-mainnet"
        }
      }
    }
  ],
  "x-sandbox": {
    "category": {
      "type": {
        "name": "category",
        "type": "string",
        "enum": [
          "core",
          "bundler",
          "nft",
          "token",
          "transfers",
          "transaction-receipts",
          "gas-manager",
          "trace",
          "debug",
          "gas-optimized-transactions",
          "private-transactions",
          "notify",
          "transaction-simulation"
        ]
      },
      "value": "core"
    }
  },
  "paths": {
    "/": {
      "post": {
        "summary": "getBlocks - Solana",
        "description": "Returns a list of confirmed blocks between two slots.",
        "tags": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "default": 1
                      },
                      "jsonrpc": {
                        "type": "string",
                        "default": "2.0"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "method": {
                        "default": "getBlocks",
                        "type": "string"
                      },
                      "params": {
                        "type": "array",
                        "items": [
                          {
                            "oneOf": [
                              {
                                "type": "integer",
                                "format": "int64",
                                "description": "(Required) Starting slot integer or (Optional) ending slot integer."
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "commitment": {
                                    "type": "string",
                                    "default": "processed",
                                    "description": "Configures the commitment level of the blocks queried.\nAccepts one of the following strings: [\"finalized\", \"confirmed\", \"processed\"]\n",
                                    "enum": [
                                      "finalized",
                                      "confirmed",
                                      "processed"
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "jsonrpc": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "result": {
                          "type": "array",
                          "description": "List of confirmed blocks between the starting and ending slot (if provided) or latest confirmed block, inclusive. Maximum query range allowed is 500,000 slots.",
                          "items": {
                            "type": "integer",
                            "format": "int64"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "rpc-solana-getBlocks",
        "x-readme": {
          "explorer-enabled": false
        },
        "security": [
          {
            "X-API-Key": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-API-Key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header",
        "description": "Your **API key** is used to identify your account & your plan, including the number of API calls per second and total monthly calls you have.\n\nEach key is for individual use only.\n\nIf you don't have a key already you can [Sign up for a Free Tatum account](https://co.tatum.io/signup) to get two keys (testnet and mainnet), allowing up to 5 API calls per second and 1,000,000 Credits.\n\nFor testing purposes, you can use the following key which only works inside docs and has limited functionality (e.g. you cannot create virtual accounts or notification subscriptions with it):\n* t-66a730ccccfd17001c479705-2f597d14ad7543f289a03418\n\nFor more details on limits and plans, [click here](https://docs.tatum.io/docs/plans-limits).\n"
      }
    }
  }
}
```