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

# getSolBalanceChangesForAddress RPC 方法

> 分页获取地址 SOL 余额的每一次变化，包括手续费、租金和小费，并返回变化前后的余额。查看 getSolBalanceChangesForAddress 的参数和代码示例。

列出每一笔改变了地址 SOL 余额的交易。每行包含以 lamports 表示的带符号变化量、变化前后的余额、slot、区块时间，以及该地址是否签名或支付了手续费。除转账外，手续费、租金和小费也会显示。

* 默认最新优先。`sortOrder: "asc"` 要求第一页设置下界：`blockTime` 或 `slot` 配合 `gte`、`gt` 或 `eq`。
* 可用 `direction`（`in`、`out`、`all`）、`blockTime` 和 `slot` 范围（`gte`、`gt`、`lte`、`lt`、`eq`；区块时间为 Unix 秒）以及以 lamports 表示的 `minAbsChange` 筛选。
* 每页最多 1,000 行（`limit`，默认 100）。传入返回的 `paginationToken` 并保持相同参数即可继续；最后一页没有该字段。
* 极少数无法解析签名的行会省略 `signature`。
* 对于多年来活动非常稀疏的地址，如果某页返回的行数偏少，请加上 `slot` 或 `blockTime` 窗口。

费用：每次调用 2 积分，计入通用 RPS。

请求配置和错误处理见 [RPC 快速入门](https://docs.solanatracker.io/cn/solana-rpc/quickstart.md)。计费见[积分与限制](https://docs.solanatracker.io/cn/solana-rpc/credits-and-rate-limits.md)。


## OpenAPI

````yaml getsolbalancechangesforaddress post /
openapi: 3.1.0
info:
  title: Solana RPC
  version: 1.0.0
  description: Solana RPC HTTP method reference.
servers:
  - url: https://rpc-mainnet.solanatracker.io
    description: Mainnet RPC endpoint
security: []
paths:
  /:
    post:
      summary: getSolBalanceChangesForAddress
      description: >-
        Page every change to an address's SOL balance: transfers, fees, rent and
        tips, with the balance before and after each one.
      operationId: getsolbalancechangesforaddress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  allOf:
                    - type: string
                      enum:
                        - '2.0'
                      description: The JSON-RPC protocol version.
                      example: '2.0'
                id:
                  allOf:
                    - type: string
                      description: A unique identifier for the request.
                      example: '1'
                method:
                  allOf:
                    - type: string
                      enum:
                        - getSolBalanceChangesForAddress
                      description: The name of the RPC method to invoke.
                      example: getSolBalanceChangesForAddress
                      default: getSolBalanceChangesForAddress
                params:
                  allOf:
                    - type: array
                      description: The address, then an optional configuration object.
                      default:
                        - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                        - sortOrder: desc
                          limit: 100
                      items:
                        oneOf:
                          - type: string
                            description: >-
                              Address whose SOL balance changes to list, as a
                              base-58 string.
                            example: 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                          - type: object
                            description: Optional sorting, filters and paging.
                            properties:
                              sortOrder:
                                type: string
                                enum:
                                  - desc
                                  - asc
                                default: desc
                                description: >-
                                  `desc` returns newest first, `asc` oldest
                                  first. `asc` needs a lower bound on
                                  `blockTime` or `slot` (`gte`, `gt` or `eq`) on
                                  the first page.
                                example: desc
                              limit:
                                type: integer
                                description: Maximum changes per page, 1 to 1,000.
                                minimum: 1
                                maximum: 1000
                                default: 100
                                example: 100
                              direction:
                                type: string
                                enum:
                                  - in
                                  - out
                                  - all
                                default: all
                                description: >-
                                  `in` for increases, `out` for decreases, `all`
                                  for both.
                                example: all
                              blockTime:
                                type: object
                                description: Block time bounds in Unix seconds.
                                properties:
                                  gte:
                                    type: integer
                                    description: Greater than or equal to this Unix time.
                                  gt:
                                    type: integer
                                    description: Greater than this Unix time.
                                  lte:
                                    type: integer
                                    description: Less than or equal to this Unix time.
                                  lt:
                                    type: integer
                                    description: Less than this Unix time.
                                  eq:
                                    type: integer
                                    description: Equal to this Unix time.
                                example:
                                  gte: 1767225600
                                  lt: 1769904000
                              slot:
                                type: object
                                description: Slot bounds.
                                properties:
                                  gte:
                                    type: integer
                                    description: Greater than or equal to this slot.
                                  gt:
                                    type: integer
                                    description: Greater than this slot.
                                  lte:
                                    type: integer
                                    description: Less than or equal to this slot.
                                  lt:
                                    type: integer
                                    description: Less than this slot.
                                  eq:
                                    type: integer
                                    description: Equal to this slot.
                                example:
                                  gte: 411000000
                              minAbsChange:
                                type: integer
                                description: >-
                                  Leave out changes smaller than this many
                                  lamports, in either direction.
                                example: 1000000000
                              paginationToken:
                                type: string
                                description: >-
                                  The `paginationToken` from the previous page.
                                  Keep the other parameters unchanged while
                                  paging.
              required:
                - jsonrpc
                - id
                - method
                - params
            examples:
              newestFirst:
                summary: Newest changes first
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getSolBalanceChangesForAddress
                  params:
                    - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                    - sortOrder: desc
                      limit: 100
              oldestFirstInWindow:
                summary: Oldest first in a time window, incoming only
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getSolBalanceChangesForAddress
                  params:
                    - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                    - sortOrder: asc
                      direction: in
                      blockTime:
                        gte: 1767225600
                        lt: 1769904000
              largeMoves:
                summary: Changes of at least 1 SOL
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getSolBalanceChangesForAddress
                  params:
                    - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                    - minAbsChange: 1000000000
                      limit: 50
              nextPage:
                summary: Next page
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getSolBalanceChangesForAddress
                  params:
                    - 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                    - sortOrder: desc
                      limit: 100
                      paginationToken: >-
                        eyJiIjoxNzc1MzU5MzU5LCJ0IjoxODYxNTk5MjE1MjIzMTk2LCJzIjo0MTExMDc5MzR9
      responses:
        '200':
          description: A page of SOL balance changes.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                  result:
                    allOf:
                      - type: object
                        description: One page of SOL balance changes.
                        properties:
                          data:
                            type: array
                            description: >-
                              Balance changes in the requested order, one per
                              transaction.
                            items:
                              type: object
                              properties:
                                confirmationStatus:
                                  type: string
                                  enum:
                                    - processed
                                    - confirmed
                                    - finalized
                                  description: Commitment of the transaction's slot.
                                  example: finalized
                                change:
                                  type: object
                                  description: The balance change.
                                  properties:
                                    signature:
                                      type: string
                                      description: >-
                                        Signature of the transaction. Omitted
                                        when it could not be resolved.
                                      example: >-
                                        5h6xBEauJ3PK6SWCZ1PGjBvj8vDdWG3KpwATGy1ARAXFSDwt8GFXM7W5Ncn16wmqokgpiKRLuS83KUxyZyv2sUYv
                                    account:
                                      type: string
                                      description: The address whose balance changed.
                                      example: >-
                                        7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                                    direction:
                                      type: string
                                      enum:
                                        - in
                                        - out
                                      description: >-
                                        `in` when the balance went up, `out`
                                        when it went down.
                                      example: out
                                    amount:
                                      type: string
                                      description: >-
                                        Size of the change in lamports, without
                                        sign.
                                      example: '5000'
                                    change:
                                      type: string
                                      description: >-
                                        Signed change in lamports (`postBalance`
                                        minus `preBalance`).
                                      example: '-5000'
                                    preBalance:
                                      type: string
                                      description: >-
                                        Balance before the transaction, in
                                        lamports.
                                      example: '1523852120'
                                    postBalance:
                                      type: string
                                      description: >-
                                        Balance after the transaction, in
                                        lamports.
                                      example: '1523847120'
                                    decimals:
                                      type: integer
                                      description: Always 9 for SOL.
                                      example: 9
                                    uiAmount:
                                      type: number
                                      description: Signed change in SOL, as a number.
                                      example: -0.000005
                                    uiAmountString:
                                      type: string
                                      description: Signed change in SOL, as a string.
                                      example: '-0.000005'
                                    blockTime:
                                      type: integer
                                      description: Block time in Unix seconds.
                                      example: 1775359359
                                    slot:
                                      type: integer
                                      description: Slot of the transaction.
                                      example: 411107934
                                    accountIndex:
                                      type: integer
                                      description: >-
                                        Index of the address in the
                                        transaction's account keys.
                                      example: 0
                                    isSigner:
                                      type: boolean
                                      description: >-
                                        Whether the address signed the
                                        transaction.
                                      example: true
                                    isFeePayer:
                                      type: boolean
                                      description: >-
                                        Whether the address paid the transaction
                                        fee.
                                      example: true
                          paginationToken:
                            type: string
                            description: >-
                              Pass this to get the next page. Omitted on the
                              last page.
                            example: >-
                              eyJiIjoxNzc1MzU5MzU5LCJ0IjoxODYxNTk5MjE1MjIzMTk2LCJzIjo0MTExMDc5MzR9
              examples:
                newestFirst:
                  summary: Newest changes first
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      data:
                        - confirmationStatus: finalized
                          change:
                            signature: >-
                              3cKcTTWWuVbqz1hVfEp9pvkmr2AyJ2rcd6XB2nGNpTwWUPzby5vgwvqLCe1vdwvxvemEjwMUiaaneWnxSJHRLgUy
                            account: 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                            direction: in
                            amount: '2000000000'
                            change: '2000000000'
                            preBalance: '1523847120'
                            postBalance: '3523847120'
                            decimals: 9
                            uiAmount: 2
                            uiAmountString: '2'
                            blockTime: 1775359525
                            slot: 411108350
                            accountIndex: 3
                            isSigner: false
                            isFeePayer: false
                        - confirmationStatus: finalized
                          change:
                            signature: >-
                              5h6xBEauJ3PK6SWCZ1PGjBvj8vDdWG3KpwATGy1ARAXFSDwt8GFXM7W5Ncn16wmqokgpiKRLuS83KUxyZyv2sUYv
                            account: 7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw
                            direction: out
                            amount: '5000'
                            change: '-5000'
                            preBalance: '1523852120'
                            postBalance: '1523847120'
                            decimals: 9
                            uiAmount: -0.000005
                            uiAmountString: '-0.000005'
                            blockTime: 1775359359
                            slot: 411107934
                            accountIndex: 0
                            isSigner: true
                            isFeePayer: true
                      paginationToken: >-
                        eyJiIjoxNzc1MzU5MzU5LCJ0IjoxODYxNTk5MjE1MjIzMTk2LCJzIjo0MTExMDc5MzR9
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32602
                      message: Invalid params
                    id: 1
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32001
                      message: Unauthorized
                    id: 1
        '429':
          description: Too Many Requests - Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32005
                      message: Too many requests
                    id: 1
        '500':
          description: Internal Server Error - An error occurred on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32603
                      message: Internal error
                    id: 1
        '503':
          description: Service Unavailable - The service is temporarily unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32002
                      message: Service unavailable
                    id: 1
        '504':
          description: Gateway Timeout - The request timed out.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32003
                      message: Gateway timeout
                    id: 1
      security:
        - ApiKeyQuery: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key

````

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