{
  "openapi": "3.1.0",
  "info": {
    "title": "MagicBlock Solana RPC API",
    "description": "Solana JSON-RPC method getBalance on MagicBlock devnet RPC endpoints.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://devnet-as.magicblock.app/",
      "description": "Devnet AS - RPC"
    },
    {
      "url": "https://devnet-us.magicblock.app/",
      "description": "Devnet US - RPC"
    },
    {
      "url": "https://devnet-eu.magicblock.app/",
      "description": "Devnet EU - RPC"
    },
    {
      "url": "https://devnet-tee.magicblock.app/",
      "description": "Devnet TEE - RPC"
    },
    {
      "url": "https://as.magicblock.app/",
      "description": "Mainnet AS - RPC"
    },
    {
      "url": "https://us.magicblock.app/",
      "description": "Mainnet US - RPC"
    },
    {
      "url": "https://eu.magicblock.app/",
      "description": "Mainnet EU - RPC"
    },
    {
      "url": "https://mainnet-tee.magicblock.app/",
      "description": "Mainnet TEE - RPC"
    }
  ],
  "paths": {
    "/": {
      "post": {
        "operationId": "getBalanceRpc",
        "summary": "getBalance",
        "description": "Solana JSON-RPC method getBalance.",
        "externalDocs": {
          "description": "Official Solana RPC documentation",
          "url": "https://solana.com/docs/rpc/http/getbalance"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "method": {
                    "type": "string",
                    "enum": [
                      "getBalance"
                    ],
                    "default": "getBalance"
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "default": "2.0"
                  },
                  "params": {
                    "type": "array",
                    "items": {
                      "type": [
                        "string",
                        "object"
                      ]
                    },
                    "description": "Method-specific parameters. See Solana RPC docs for exact shape.",
                    "minItems": 1,
                    "maxItems": 2,
                    "default": [
                      "5RgeA5P8bRaynJovch3zQURfJxXL3QK2JYg1YamSvyLb"
                    ]
                  },
                  "id": {
                    "oneOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "default": 0
                  }
                },
                "default": {
                  "method": "getBalance",
                  "jsonrpc": "2.0",
                  "params": [
                    "5RgeA5P8bRaynJovch3zQURfJxXL3QK2JYg1YamSvyLb"
                  ],
                  "id": 0
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "method",
                  "params"
                ]
              },
              "example": {
                "method": "getBalance",
                "jsonrpc": "2.0",
                "params": [
                  "5RgeA5P8bRaynJovch3zQURfJxXL3QK2JYg1YamSvyLb"
                ],
                "id": 0
              },
              "examples": {
                "default": {
                  "summary": "Default getBalance request",
                  "value": {
                    "method": "getBalance",
                    "jsonrpc": "2.0",
                    "params": [
                      "5RgeA5P8bRaynJovch3zQURfJxXL3QK2JYg1YamSvyLb"
                    ],
                    "id": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ],
                      "default": "2.0"
                    },
                    "id": {
                      "oneOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "result": {
                      "description": "Method-specific result payload.",
                      "oneOf": [
                        {
                          "type": "object"
                        },
                        {
                          "type": "array"
                        },
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "error": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "jsonrpc",
                    "id"
                  ]
                },
                "example": {
                  "jsonrpc": "2.0",
                  "id": 0,
                  "result": {
                    "context": {
                      "apiVersion": "2.2.1",
                      "slot": 85838062
                    },
                    "value": {
                      "amount": 5000000,
                      "decimals": 9
                    }
                  },
                  "error": null
                }
              }
            }
          }
        }
      }
    }
  }
}