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

# JSON-RPC API endpoint

> Send JSON-RPC requests to interact with the blockchain



## OpenAPI

````yaml public/openapi-geth.json post /v1/{network}/{apikey}
openapi: 3.0.0
info:
  title: Winnie - GETH JSON-RPC API
  description: API for interacting with Berachain using GETH methods
  version: 1.0.0
servers:
  - description: Mainnet
    url: https://api.henlo-winnie.dev
security: []
tags:
  - name: JSON-RPC
    description: Ethereum JSON-RPC Methods
paths:
  /v1/{network}/{apikey}:
    post:
      summary: JSON-RPC API endpoint
      description: Send JSON-RPC requests to interact with the blockchain
      operationId: jsonRpc
      parameters:
        - name: network
          in: path
          required: true
          description: The blockchain network to use
          schema:
            type: string
            enum:
              - mainnet
              - testnet
            default: mainnet
        - name: apikey
          in: path
          required: true
          description: Your API key for authentication
          schema:
            type: string
      requestBody:
        description: JSON-RPC Request
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequest'
            examples:
              eth_blockNumber:
                value:
                  jsonrpc: '2.0'
                  method: eth_blockNumber
                  params: []
                  id: 1
              eth_getBalance:
                value:
                  jsonrpc: '2.0'
                  method: eth_getBalance
                  params:
                    - '0x407d73d8a49eeb85d32cf465507dd71d507100c1'
                    - latest
                  id: 2
      responses:
        '200':
          description: Successful JSON-RPC response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - $ref: '#/components/schemas/ErrorResponse'
              examples:
                eth_blockNumber:
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result: '0x4b7'
                eth_getBalance:
                  value:
                    jsonrpc: '2.0'
                    id: 2
                    result: '0x0234c8a3397aab58'
                error:
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    error:
                      code: -32602
                      message: Invalid params
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    JsonRpcRequest:
      type: object
      required:
        - jsonrpc
        - method
        - id
      properties:
        jsonrpc:
          type: string
          description: JSON-RPC Version
          enum:
            - '2.0'
          default: '2.0'
        method:
          type: string
          description: JSON-RPC method to call
          enum:
            - web3_clientVersion
            - web3_sha3
            - net_version
            - net_listening
            - net_peerCount
            - eth_protocolVersion
            - eth_syncing
            - eth_coinbase
            - eth_mining
            - eth_hashrate
            - eth_gasPrice
            - eth_accounts
            - eth_blockNumber
            - eth_getBalance
            - eth_getStorageAt
            - eth_getTransactionCount
            - eth_getBlockTransactionCountByHash
            - eth_getBlockTransactionCountByNumber
            - eth_getUncleCountByBlockHash
            - eth_getUncleCountByBlockNumber
            - eth_getCode
            - eth_sign
            - eth_sendTransaction
            - eth_sendRawTransaction
            - eth_call
            - eth_estimateGas
            - eth_getBlockByHash
            - eth_getBlockByNumber
            - eth_getTransactionByHash
            - eth_getTransactionByBlockHashAndIndex
            - eth_getTransactionByBlockNumberAndIndex
            - eth_getTransactionReceipt
            - eth_getUncleByBlockHashAndIndex
            - eth_getUncleByBlockNumberAndIndex
            - eth_getLogs
            - eth_newFilter
            - eth_newBlockFilter
            - eth_newPendingTransactionFilter
            - eth_uninstallFilter
            - eth_getFilterChanges
            - eth_getFilterLogs
            - eth_pendingTransactions
            - eth_feeHistory
            - eth_maxPriorityFeePerGas
            - debug_traceTransaction
            - debug_traceCall
            - debug_traceBlockByNumber
            - debug_traceBlockByHash
        params:
          type: array
          description: Method parameters
          items:
            type: string
          default: []
        id:
          oneOf:
            - type: string
            - type: number
          description: Request identifier
          default: '1'
    SuccessResponse:
      type: object
      required:
        - jsonrpc
        - id
        - result
      properties:
        jsonrpc:
          type: string
          description: JSON-RPC Version
          enum:
            - '2.0'
        result:
          description: Request result
        id:
          oneOf:
            - type: string
            - type: number
          description: Request identifier
    ErrorResponse:
      type: object
      required:
        - jsonrpc
        - error
        - id
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
        error:
          $ref: '#/components/schemas/JsonRpcError'
        id:
          oneOf:
            - type: string
            - type: number
    JsonRpcError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: JSON-RPC error code
        message:
          type: string
          description: Error message
        data:
          description: Additional error data

````