> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kas.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Get virtual chain from block

> Retrieves the virtual chain starting from a specific block.

## Cost

This endpoint costs **0.1 RU** (Request Units) per call.


## OpenAPI

````yaml POST /v1/rpc/getVirtualChainFromBlock
openapi: 3.0.0
info:
  title: Kaspa Developer Platform (KDP) API
  description: >-
    A high-performance REST API providing real-time and historical data from the
    Kaspa blockchain
  version: '1.0'
  contact: {}
servers:
  - url: https://api.kas.fyi
    description: Mainnet API
security: []
tags:
  - name: Address
    description: Operations related to Kaspa addresses
  - name: Block
    description: Operations related to Kaspa blocks
  - name: Transaction
    description: Operations related to Kaspa transactions
  - name: Token
    description: Operations related to KRC20 tokens
  - name: Kaspa Node RPC Proxy
    description: Direct proxy to Kaspa node RPC methods
paths:
  /v1/rpc/getVirtualChainFromBlock:
    post:
      tags:
        - Kaspa Node RPC Proxy
      summary: Get virtual chain from block
      description: Retrieves the virtual chain starting from a specific block.
      operationId: RpcController_getVirtualChainFromBlock
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RpcGetVirtualChainFromBlockRequestDto'
      responses:
        '200':
          description: Virtual chain retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RpcGetVirtualChainFromBlockResponseDto'
      security:
        - x-api-key: []
components:
  schemas:
    RpcGetVirtualChainFromBlockRequestDto:
      type: object
      properties:
        startHash:
          type: string
          description: Starting block hash
          example: fc4c90a646687ba6f862e6089285dd7a610ef4d7f7614d25295f65aceb02bc41
        includeAcceptedTransactionIds:
          type: boolean
          description: Whether to include accepted transaction IDs
          example: true
      required:
        - startHash
        - includeAcceptedTransactionIds
    RpcGetVirtualChainFromBlockResponseDto:
      type: object
      properties:
        removedChainBlockHashes:
          description: Array of removed chain block hashes
          example:
            - 34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6
          type: array
          items:
            type: string
        addedChainBlockHashes:
          description: Array of added chain block hashes
          example:
            - '0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba'
          type: array
          items:
            type: string
        acceptedTransactionIds:
          description: Array of accepted transaction IDs by block
          type: array
          items:
            $ref: '#/components/schemas/RpcAcceptedTransactionIdsDto'
      required:
        - removedChainBlockHashes
        - addedChainBlockHashes
        - acceptedTransactionIds
    RpcAcceptedTransactionIdsDto:
      type: object
      properties:
        acceptingBlockHash:
          type: string
          description: Block hash that accepted these transactions
          example: 34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6
        acceptedTransactionIds:
          description: Array of accepted transaction IDs
          example:
            - 34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6
            - '0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba'
          type: array
          items:
            type: string
      required:
        - acceptingBlockHash
        - acceptedTransactionIds
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key required for authentication. Get your API key at
        https://developer.kas.fyi

````