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

# Native SOL balance

> Returns the wallet's current native SOL balance via Shyft's `getBalance` JSON-RPC call, plus USD conversion via the Pyth oracle.

When Shyft is unavailable, `sol_balance` is `null` and the response still returns 200 — it never 500s on a Shyft blip. Response cached 30 seconds.



## OpenAPI

````yaml /api-reference/openapi.json get /wallets/{w}/sol-balance
openapi: 3.1.0
info:
  title: Dexploit API
  version: 1.0.0
  description: Real-time and historical Solana DEX swap and OHLCV data.
servers:
  - url: https://api.dexploit.dev
    description: Production
security:
  - ApiKeyHeader: []
  - BearerAuth: []
  - ApiKeyQuery: []
paths:
  /wallets/{w}/sol-balance:
    get:
      tags:
        - Wallet portfolio
      summary: Native SOL balance
      description: >-
        Returns the wallet's current native SOL balance via Shyft's `getBalance`
        JSON-RPC call, plus USD conversion via the Pyth oracle.


        When Shyft is unavailable, `sol_balance` is `null` and the response
        still returns 200 — it never 500s on a Shyft blip. Response cached 30
        seconds.
      operationId: getWalletSolBalance
      parameters:
        - name: w
          in: path
          required: true
          schema:
            type: string
          description: Wallet address (base58, 32–44 characters).
      responses:
        '200':
          description: SOL balance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolBalanceResponse'
        '400':
          description: Wallet address is not valid base58
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    SolBalanceResponse:
      type: object
      description: >-
        Native SOL balance for a wallet. `sol_balance` is `null` when Shyft's
        `getBalance` call fails; the response is still 200.
      required:
        - wallet
        - computed_at
      properties:
        wallet:
          type: string
        sol_balance:
          type:
            - number
            - 'null'
          description: Native SOL balance (not lamports). `null` on Shyft error.
        sol_balance_usd:
          type:
            - number
            - 'null'
          description: >-
            SOL balance converted to USD via the Pyth oracle. `null` when
            balance or oracle is unavailable.
        computed_at:
          type: integer
          format: int64
          description: Unix epoch milliseconds when this response was assembled.
    ErrorEnvelope:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: INVALID_PARAM
            message:
              type: string
              example: >-
                use pair_address; see /api/v1/pairs?token_address=X to discover
                pools
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Preferred for swaps-api endpoints (`/swaps/*`, `/stats/*`, `/trending`,
        `/pool-events`).
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Required by the OHLCV endpoints (`/api/v1/*`) and accepted by every
        other endpoint. Send `Authorization: Bearer ohlcv_live_sk_<your_key>`.
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: >-
        Browser-friendly alternative to the Bearer header — accepted by every
        endpoint and required for WebSocket from the browser.

````