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

# Mock Stellar RPC

> JSON-RPC 2.0 with the wire shapes of Stellar RPC. Supports `getHealth`, `getNetwork`, `getLatestLedger` and `getLedgers` (cursor paging over the corpus's sparse ledgers). Point an RPC-backed indexer at `https://rpc.istravex.com/{network}` to replay the corpus. Batches of up to 20 requests; bodies up to 64 KB.



## OpenAPI

````yaml POST /rpc/{network}
openapi: 3.1.0
info:
  title: Istravex API
  version: 1.0.0
  description: >-
    Read-only access to the Istravex corpus: fixtures, their raw XDR, the
    canonical ledgers they were verified against, and the kit's results. Also
    hosts a mock Stellar RPC that replays the corpus for any RPC-backed indexer.
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  contact:
    url: https://github.com/hackcat29/istravex
servers:
  - url: https://api.istravex.com
    description: Production
  - url: http://localhost:8080
    description: Local (`npm run api`)
security: []
tags:
  - name: Service
  - name: Fixtures
  - name: Ledgers
  - name: Results
  - name: RPC
paths:
  /rpc/{network}:
    post:
      tags:
        - RPC
      summary: Mock Stellar RPC
      description: >-
        JSON-RPC 2.0 with the wire shapes of Stellar RPC. Supports `getHealth`,
        `getNetwork`, `getLatestLedger` and `getLedgers` (cursor paging over the
        corpus's sparse ledgers). Point an RPC-backed indexer at
        `https://rpc.istravex.com/{network}` to replay the corpus. Batches of up
        to 20 requests; bodies up to 64 KB.
      operationId: rpc
      parameters:
        - name: network
          in: path
          required: true
          schema:
            type: string
            enum:
              - pubnet
              - testnet
              - local
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequest'
            example:
              jsonrpc: '2.0'
              id: 1
              method: getLedgers
              params:
                startLedger: 65474279
                pagination:
                  limit: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponse'
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  status: healthy
                  latestLedger: 65474309
                  latestLedgerCloseTime: '1794657587'
                  oldestLedger: 65474279
                  oldestLedgerCloseTime: '1794657437'
                  ledgerRetentionWindow: 31
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: Fixture not found
        '413':
          description: Body over 64 KB
        '429':
          description: Rate limited
          headers:
            Retry-After:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    JsonRpcRequest:
      type: object
      required:
        - jsonrpc
        - method
      properties:
        jsonrpc:
          type: string
          const: '2.0'
        id:
          type:
            - string
            - integer
            - 'null'
        method:
          type: string
          enum:
            - getHealth
            - getNetwork
            - getLatestLedger
            - getLedgers
        params:
          type: object
    JsonRpcResponse:
      type: object
      properties:
        jsonrpc:
          type: string
        id:
          type:
            - string
            - integer
            - 'null'
        result:
          type: object
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.