Litecoin Blocks API

Block and header retrieval endpoints

Operations 22

GET /rest/block/{blockHash}.json Get block with full transaction details (JSON) #
GET /rest/block/{blockHash}.hex Get block (hex) #
GET /rest/block/{blockHash}.bin Get block (binary) #
GET /rest/block/notxdetails/{blockHash}.json Get block without full transaction details (JSON) #
GET /rest/block/notxdetails/{blockHash}.hex Get block without transaction details (hex) #
GET /rest/headers/{count}/{blockHash}.json Get block headers (JSON) #
GET /rest/headers/{count}/{blockHash}.hex Get block headers (hex) #
GET /rest/blockhashbyheight/{height}.json Get block hash by height (JSON) #
GET /rest/blockhashbyheight/{height}.hex Get block hash by height (hex) #
GET /block/{hash} Get block details #
GET /block/{hash}/header Get block header #
GET /block-height/{height} Get block hash at height #
GET /block/{hash}/raw Get raw block data #
GET /block/{hash}/status Get block confirmation status #
GET /blocks/tip/height Get latest block height #
GET /blocks/tip/hash Get latest block hash #
GET /block/{hash}/txid/{index} Get transaction ID at index in block #
GET /block/{hash}/txids Get all transaction IDs in block #
GET /block/{hash}/txs/{startIndex} Get block transactions #
GET /blocks/{startHeight} Get recent blocks #
GET /v1/blocks/{startHeight} Get recent blocks with mining data (v1) #
GET /v1/blocks-bulk/{minHeight}/{maxHeight} Get bulk range of blocks #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/litecoin-blocks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

litecoin-blocks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Litecoin Blocks API
  version: '1.0'
  description: 'Operations tagged Blocks across 2 of this provider''s published API definitions: litecoin-core-rest.yml, litecoin-space-rest.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:9332
  description: Litecoin Core mainnet (start with -rest flag)
- url: http://localhost:19332
  description: Litecoin Core testnet
- url: http://localhost:19443
  description: Litecoin Core regtest
- url: https://litecoinspace.org/api
  description: Litecoin Space mainnet
tags:
- name: Blocks
  description: Block and header retrieval endpoints
paths:
  /rest/block/{blockHash}.json:
    get:
      operationId: getBlockJson
      summary: Get block with full transaction details (JSON)
      description: 'Returns complete block data including all transaction details in JSON format. Returns 404 if the block is not found.

        '
      parameters:
      - $ref: '#/components/parameters/blockHash'
      responses:
        '200':
          description: Block with full transaction details in JSON format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Block'
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: http://localhost:9332
      description: Litecoin Core mainnet (start with -rest flag)
    - url: http://localhost:19332
      description: Litecoin Core testnet
    - url: http://localhost:19443
      description: Litecoin Core regtest
  /rest/block/{blockHash}.hex:
    get:
      operationId: getBlockHex
      summary: Get block (hex)
      description: Returns complete block data in hex-encoded format.
      parameters:
      - $ref: '#/components/parameters/blockHash'
      responses:
        '200':
          description: Hex-encoded block data
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: http://localhost:9332
      description: Litecoin Core mainnet (start with -rest flag)
    - url: http://localhost:19332
      description: Litecoin Core testnet
    - url: http://localhost:19443
      description: Litecoin Core regtest
  /rest/block/{blockHash}.bin:
    get:
      operationId: getBlockBin
      summary: Get block (binary)
      description: Returns complete block data in raw binary format.
      parameters:
      - $ref: '#/components/parameters/blockHash'
      responses:
        '200':
          description: Raw binary block data
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: http://localhost:9332
      description: Litecoin Core mainnet (start with -rest flag)
    - url: http://localhost:19332
      description: Litecoin Core testnet
    - url: http://localhost:19443
      description: Litecoin Core regtest
  /rest/block/notxdetails/{blockHash}.json:
    get:
      operationId: getBlockNoTxDetailsJson
      summary: Get block without full transaction details (JSON)
      description: 'Returns block data in JSON format, but the transactions array contains only transaction hashes rather than full transaction objects.

        '
      parameters:
      - $ref: '#/components/parameters/blockHash'
      responses:
        '200':
          description: Block with transaction IDs only in JSON format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockNoTxDetails'
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: http://localhost:9332
      description: Litecoin Core mainnet (start with -rest flag)
    - url: http://localhost:19332
      description: Litecoin Core testnet
    - url: http://localhost:19443
      description: Litecoin Core regtest
  /rest/block/notxdetails/{blockHash}.hex:
    get:
      operationId: getBlockNoTxDetailsHex
      summary: Get block without transaction details (hex)
      description: Returns block data in hex-encoded format without full transaction expansion.
      parameters:
      - $ref: '#/components/parameters/blockHash'
      responses:
        '200':
          description: Hex-encoded block data
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: http://localhost:9332
      description: Litecoin Core mainnet (start with -rest flag)
    - url: http://localhost:19332
      description: Litecoin Core testnet
    - url: http://localhost:19443
      description: Litecoin Core regtest
  /rest/headers/{count}/{blockHash}.json:
    get:
      operationId: getBlockHeadersJson
      summary: Get block headers (JSON)
      description: 'Retrieves the specified number of block headers starting from the given block hash and going in the upward (newer) direction.

        '
      parameters:
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/blockHash'
      responses:
        '200':
          description: Array of block headers in JSON format
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BlockHeader'
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: http://localhost:9332
      description: Litecoin Core mainnet (start with -rest flag)
    - url: http://localhost:19332
      description: Litecoin Core testnet
    - url: http://localhost:19443
      description: Litecoin Core regtest
  /rest/headers/{count}/{blockHash}.hex:
    get:
      operationId: getBlockHeadersHex
      summary: Get block headers (hex)
      description: Returns the specified number of block headers in hex-encoded format.
      parameters:
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/blockHash'
      responses:
        '200':
          description: Hex-encoded block headers
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: http://localhost:9332
      description: Litecoin Core mainnet (start with -rest flag)
    - url: http://localhost:19332
      description: Litecoin Core testnet
    - url: http://localhost:19443
      description: Litecoin Core regtest
  /rest/blockhashbyheight/{height}.json:
    get:
      operationId: getBlockHashByHeightJson
      summary: Get block hash by height (JSON)
      description: Returns the hash of the block at the specified height in JSON format.
      parameters:
      - $ref: '#/components/parameters/height'
      responses:
        '200':
          description: Block hash in JSON format
          content:
            application/json:
              schema:
                type: object
                properties:
                  blockhash:
                    type: string
                    description: The block hash at the specified height
        '404':
          description: Block height not found
      tags:
      - Blocks
    servers:
    - url: http://localhost:9332
      description: Litecoin Core mainnet (start with -rest flag)
    - url: http://localhost:19332
      description: Litecoin Core testnet
    - url: http://localhost:19443
      description: Litecoin Core regtest
  /rest/blockhashbyheight/{height}.hex:
    get:
      operationId: getBlockHashByHeightHex
      summary: Get block hash by height (hex)
      description: Returns the hash of the block at the specified height in hex format.
      parameters:
      - $ref: '#/components/parameters/height'
      responses:
        '200':
          description: Block hash as hex string
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Block height not found
      tags:
      - Blocks
    servers:
    - url: http://localhost:9332
      description: Litecoin Core mainnet (start with -rest flag)
    - url: http://localhost:19332
      description: Litecoin Core testnet
    - url: http://localhost:19443
      description: Litecoin Core regtest
  /block/{hash}:
    get:
      operationId: getBlock
      summary: Get block details
      description: Returns details about the block including header fields and transaction summary.
      parameters:
      - $ref: '#/components/parameters/hash'
      responses:
        '200':
          description: Block details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Block_2'
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /block/{hash}/header:
    get:
      operationId: getBlockHeader
      summary: Get block header
      description: Returns the hex-encoded block header.
      parameters:
      - $ref: '#/components/parameters/hash'
      responses:
        '200':
          description: Hex-encoded block header
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /block-height/{height}:
    get:
      operationId: getBlockHashAtHeight
      summary: Get block hash at height
      description: Returns the hash of the block at the specified height.
      parameters:
      - $ref: '#/components/parameters/height'
      responses:
        '200':
          description: Block hash as plain text
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Block height not found
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /block/{hash}/raw:
    get:
      operationId: getBlockRaw
      summary: Get raw block data
      description: Returns the raw block data in binary format.
      parameters:
      - $ref: '#/components/parameters/hash'
      responses:
        '200':
          description: Raw binary block data
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /block/{hash}/status:
    get:
      operationId: getBlockStatus
      summary: Get block confirmation status
      description: Returns the confirmation status of a block.
      parameters:
      - $ref: '#/components/parameters/hash'
      responses:
        '200':
          description: Block confirmation status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockStatus'
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /blocks/tip/height:
    get:
      operationId: getBlockTipHeight
      summary: Get latest block height
      description: Returns the height of the latest confirmed block.
      responses:
        '200':
          description: Current block height as plain integer
          content:
            text/plain:
              schema:
                type: integer
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /blocks/tip/hash:
    get:
      operationId: getBlockTipHash
      summary: Get latest block hash
      description: Returns the hash of the latest confirmed block.
      responses:
        '200':
          description: Current block hash as plain text
          content:
            text/plain:
              schema:
                type: string
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /block/{hash}/txid/{index}:
    get:
      operationId: getBlockTxid
      summary: Get transaction ID at index in block
      description: Returns the transaction ID at the specified index within the block.
      parameters:
      - $ref: '#/components/parameters/hash'
      - name: index
        in: path
        required: true
        description: Zero-based transaction index within the block
        schema:
          type: integer
          minimum: 0
      responses:
        '200':
          description: Transaction ID
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Not found
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /block/{hash}/txids:
    get:
      operationId: getBlockTxids
      summary: Get all transaction IDs in block
      description: Returns all transaction IDs included in the block.
      parameters:
      - $ref: '#/components/parameters/hash'
      responses:
        '200':
          description: Array of transaction IDs
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /block/{hash}/txs/{startIndex}:
    get:
      operationId: getBlockTxs
      summary: Get block transactions
      description: Returns up to 25 transactions from the block starting at the given index.
      parameters:
      - $ref: '#/components/parameters/hash'
      - name: startIndex
        in: path
        required: true
        description: Starting index (must be a multiple of 25)
        schema:
          type: integer
          minimum: 0
      responses:
        '200':
          description: Array of transactions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Transaction_2'
        '404':
          description: Block not found
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /blocks/{startHeight}:
    get:
      operationId: getBlocks
      summary: Get recent blocks
      description: Returns the past 10 blocks before the specified height (or tip if omitted).
      parameters:
      - name: startHeight
        in: path
        required: false
        description: Block height to start from (defaults to chain tip)
        schema:
          type: integer
      responses:
        '200':
          description: Array of blocks
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Block_2'
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /v1/blocks/{startHeight}:
    get:
      operationId: getBlocksV1
      summary: Get recent blocks with mining data (v1)
      description: Returns the past 15 blocks before the specified height including mining pool information.
      parameters:
      - name: startHeight
        in: path
        required: false
        description: Block height to start from (defaults to chain tip)
        schema:
          type: integer
      responses:
        '200':
          description: Array of blocks with mining data
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BlockWithMining'
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
  /v1/blocks-bulk/{minHeight}/{maxHeight}:
    get:
      operationId: getBlocksBulk
      summary: Get bulk range of blocks
      description: Returns a range of blocks (up to 10 at a time) by height range.
      parameters:
      - name: minHeight
        in: path
        required: true
        schema:
          type: integer
      - name: maxHeight
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Array of blocks in the height range
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Block_2'
      tags:
      - Blocks
    servers:
    - url: https://litecoinspace.org/api
      description: Litecoin Space mainnet
components:
  parameters:
    height:
      name: height
      in: path
      required: true
      description: Block height (0-indexed from genesis)
      schema:
        type: integer
        minimum: 0
    blockHash:
      name: blockHash
      in: path
      required: true
      description: Block hash in hex format
      schema:
        type: string
        pattern: ^[0-9a-fA-F]{64}$
    count:
      name: count
      in: path
      required: true
      description: Number of block headers to retrieve
      schema:
        type: integer
        minimum: 1
        maximum: 2000
    hash:
      name: hash
      in: path
      required: true
      description: Block hash in hex format
      schema:
        type: string
        pattern: ^[0-9a-fA-F]{64}$
  schemas:
    BlockHeader:
      type: object
      properties:
        hash:
          type: string
        confirmations:
          type: integer
        height:
          type: integer
        version:
          type: integer
        versionHex:
          type: string
        merkleroot:
          type: string
        time:
          type: integer
        mediantime:
          type: integer
        nonce:
          type: integer
        bits:
          type: string
        difficulty:
          type: number
        chainwork:
          type: string
        nTx:
          type: integer
        previousblockhash:
          type: string
        nextblockhash:
          type: string
    Transaction:
      type: object
      properties:
        txid:
          type: string
          description: Transaction ID
        hash:
          type: string
          description: Transaction hash (differs from txid for segwit)
        size:
          type: integer
          description: Transaction size in bytes
        vsize:
          type: integer
          description: Virtual transaction size
        weight:
          type: integer
          description: Transaction weight
        version:
          type: integer
          description: Transaction version
        locktime:
          type: integer
          description: Transaction lock time
        vin:
          type: array
          items:
            type: object
            properties:
              txid:
                type: string
              vout:
                type: integer
              scriptSig:
                type: object
              txinwitness:
                type: array
                items:
                  type: string
              sequence:
                type: integer
        vout:
          type: array
          items:
            type: object
            properties:
              value:
                type: number
                description: Output value in LTC
              n:
                type: integer
              scriptPubKey:
                type: object
        blockhash:
          type: string
          description: Hash of the block containing this transaction
        confirmations:
          type: integer
          description: Number of confirmations
        time:
          type: integer
          description: Transaction time (Unix timestamp)
        blocktime:
          type: integer
          description: Block time (Unix timestamp)
    Block:
      type: object
      properties:
        hash:
          type: string
          description: Block hash
        confirmations:
          type: integer
        size:
          type: integer
        strippedsize:
          type: integer
        weight:
          type: integer
        height:
          type: integer
        version:
          type: integer
        versionHex:
          type: string
        merkleroot:
          type: string
        tx:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
          description: Full transaction objects
        time:
          type: integer
        mediantime:
          type: integer
        nonce:
          type: integer
        bits:
          type: string
        difficulty:
          type: number
        chainwork:
          type: string
        nTx:
          type: integer
        previousblockhash:
          type: string
        nextblockhash:
          type: string
    BlockNoTxDetails:
      allOf:
      - $ref: '#/components/schemas/Block'
      properties:
        tx:
          type: array
          items:
            type: string
          description: Array of transaction IDs only
    BlockWithMining:
      allOf:
      - $ref: '#/components/schemas/Block_2'
      properties:
        extras:
          type: object
          properties:
            reward:
              type: integer
            coinbaseTx:
              type: object
            totalFees:
              type: integer
            avgFee:
              type: integer
            avgFeeRate:
              type: integer
            pool:
              type: object
              properties:
                id:
                  type: integer
                name:
                  type: string
                slug:
                  type: string
    BlockStatus:
      type: object
      properties:
        in_best_chain:
          type: boolean
        height:
          type: integer
        next_best:
          type: string
    TxOutput:
      type: object
      properties:
        scriptpubkey:
          type: string
        scriptpubkey_asm:
          type: string
        scriptpubkey_type:
          type: string
        scriptpubkey_address:
          type: string
        value:
          type: integer
          description: Output value in satoshis
    TxStatus:
      type: object
      properties:
        confirmed:
          type: boolean
        block_height:
          type:
          - integer
          - 'null'
        block_hash:
          type:
          - string
          - 'null'
        block_time:
          type:
          - integer
          - 'null'
    TxInput:
      type: object
      properties:
        txid:
          type: string
        vout:
          type: integer
        prevout:
          $ref: '#/components/schemas/TxOutput'
        scriptsig:
          type: string
        scriptsig_asm:
          type: string
        witness:
          type: array
          items:
            type: string
        is_coinbase:
          type: boolean
        sequence:
          type: integer
    Transaction_2:
      type: object
      properties:
        txid:
          type: string
        version:
          type: integer
        locktime:
          type: integer
        vin:
          type: array
          items:
            $ref: '#/components/schemas/TxInput'
        vout:
          type: array
          items:
            $ref: '#/components/schemas/TxOutput'
        size:
          type: integer
        weight:
          type: integer
        sigops:
          type: integer
        fee:
          type: integer
          description: Transaction fee in satoshis
        status:
          $ref: '#/components/schemas/TxStatus'
    Block_2:
      type: object
      properties:
        id:
          type: string
          description: Block hash
        height:
          type: integer
        version:
          type: integer
        timestamp:
          type: integer
        tx_count:
          type: integer
        size:
          type: integer
        weight:
          type: integer
        merkle_root:
          type: string
        previousblockhash:
          type: string
        mediantime:
          type: integer
        nonce:
          type: integer
        bits:
          type: integer
        difficulty:
          type: number
x-refined-from:
- litecoin-core-rest.yml
- litecoin-space-rest.yml