> ## 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.

# Get Account Transfers

> 钱包的转账历史：转入和转出的 SOL、SPL 和 Token-2022 转账，按从新到旧排序，包含代币元数据、钱包身份，以及可选的每笔转账发生时的美元价格。

默认不包含有 DEX 活动（兑换、添加和移除流动性、领取池手续费）的交易中的转账；设置 `dex=include` 或 `dex=only` 可查看这些转账。可按代币、方向、发送方、接收方或交易对手、时间或插槽范围、数量、美元价值和交易结果筛选，也可按交易分组转账。此端点的时间戳为 Unix **秒**。

每个参数只有一个名称。未知参数会返回 400，并指出正确的参数名（`unknown parameter timeStart; use start`），因此拼写错误不会返回未经筛选的页面。

**分页：** 沿 `pagination.next` 继续请求，直到 `hasMore` 为 `false`。每页只包含完整的交易，因此转账数可能比 `limit` 略多或略少。带筛选的请求每次只读取有限数量的转账，因此即使 `hasMore` 仍为 `true`，一页也可能少于 `limit` 条，甚至为空。

如需实时转账，请在 Datastream 上加入[转账房间](/cn/datastream/websockets/transferwallet)。参阅[转账指南](/cn/guides/transfers)。

## SDK Example

```typescript
import { Client } from '@solana-tracker/data-api';

const client = new Client({ apiKey: 'YOUR_API_KEY' });

// USDC received over the last week, worth at least $10 at the time.
const data = await client.getAccountTransfers('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', {
  direction: 'in',
  mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
  minValue: 10,
  start: Math.floor(Date.now() / 1000) - 7 * 86400,
  limit: 100,
});

// Pass grouped: true for one entry per transaction, or use
// client.iterateAccountTransfers() with the same filters to page through every result.
```


## OpenAPI

````yaml /cn/data-api/openapi.json get /account/{address}/transfers
openapi: 3.1.0
info:
  title: Solana Tracker 数据 API
  description: Solana Tracker 数据 API：提供代币价格、持币地址、成交、图表、钱包数据、风险信号与市场分析等能力。
  version: 1.0.0
  contact:
    email: contact@solanatracker.io
servers:
  - url: https://data.solanatracker.io
    description: 生产环境
security:
  - apiKey: []
paths:
  /account/{address}/transfers:
    get:
      tags:
        - Transfers
      summary: Get Account Transfers
      description: >-
        钱包的转账历史：转入和转出的 SOL、SPL 和 Token-2022
        转账，按从新到旧排序，包含代币元数据、钱包身份，以及可选的每笔转账发生时的美元价格。


        默认不包含有 DEX 活动（兑换、添加和移除流动性、领取池手续费）的交易中的转账；设置 `dex=include` 或 `dex=only`
        可查看这些转账。可按代币、方向、发送方、接收方或交易对手、时间或插槽范围、数量、美元价值和交易结果筛选，也可按交易分组转账。此端点的时间戳为
        Unix **秒**。


        每个参数只有一个名称。未知参数会返回 400，并指出正确的参数名（`unknown parameter timeStart; use
        start`），因此拼写错误不会返回未经筛选的页面。


        **分页：** 沿 `pagination.next` 继续请求，直到 `hasMore` 为
        `false`。每页只包含完整的交易，因此转账数可能比 `limit` 略多或略少。带筛选的请求每次只读取有限数量的转账，因此即使
        `hasMore` 仍为 `true`，一页也可能少于 `limit` 条，甚至为空。


        如需实时转账，请在 Datastream
        上加入[转账房间](/cn/datastream/websockets/transferwallet)。参阅[转账指南](/cn/guides/transfers)。
      parameters:
        - name: address
          in: path
          required: true
          schema:
            type: string
          description: 钱包或账户地址。SPL 转账通过该钱包拥有的代币账户匹配。
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
          description: >-
            每页转账数。每页只包含完整的交易，因此可能略多或略少。`grouped=true` 时改为按交易计数，除非设置了
            `dex=include`，且未设置 `type`、地址、数量或插槽筛选以及 `excludeZero` 中的任何一个。使用
            `minValue` 或 `maxValue` 时最多为 100。
        - name: cursor
          in: query
          schema:
            type: string
          description: 上一页返回的 `pagination.next`。翻页时请保持其他参数不变。传入空的 `cursor=` 会返回第一页。
        - name: sortOrder
          in: query
          schema:
            type: string
            enum:
              - desc
              - asc
            default: desc
          description: '`desc` 按从新到旧返回，`asc` 按从旧到新返回。'
        - name: start
          in: query
          description: 区块时间起点，Unix **秒**，包含边界值。不接受毫秒。
          schema:
            type: integer
            minimum: 0
        - name: end
          in: query
          description: 区块时间终点，Unix **秒**，包含边界值。不得早于 `start`。
          schema:
            type: integer
            minimum: 0
        - name: startSlot
          in: query
          schema:
            type: integer
            minimum: 0
          description: 插槽起点，包含边界值。
        - name: endSlot
          in: query
          schema:
            type: integer
            minimum: 0
          description: 插槽终点，包含边界值。
        - name: direction
          in: query
          schema:
            type: string
            enum:
              - all
              - in
              - out
            default: all
          description: 该地址接收（`in`）或发出（`out`）的转账。
        - name: type
          in: query
          description: >-
            `sol` 表示原生 SOL 转账，`spl` 表示 SPL 和 Token-2022 转账（包括 wrapped
            SOL）。默认两者都返回。
          schema:
            type: string
            enum:
              - sol
              - spl
        - name: mint
          in: query
          schema:
            type: string
          description: >-
            仅返回此代币的转账。使用 wrapped SOL mint
            `So11111111111111111111111111111111111111112` 时会返回原生 SOL 和 wrapped
            SOL 转账。
        - name: status
          in: query
          description: 交易结果：`success`（默认）、`failed` 或 `any`。每笔转账都有各自的 `status`。
          schema:
            type: string
            enum:
              - success
              - failed
              - any
            default: success
        - name: dex
          in: query
          description: >-
            `exclude`（默认）排除有 DEX 活动的交易中的所有转账，`only` 仅返回这些转账，`include`
            返回全部。当交易中有转账发往或来自某个池（DEX 或发射台程序拥有的账户，或 Raydium、Meteora
            的金库权限账户）时，该交易即视为有 DEX
            活动：包括兑换、添加和移除流动性，以及领取手续费或奖励。该地址发出一种代币并收到另一种代币的交易也算在内。
          schema:
            type: string
            enum:
              - exclude
              - include
              - only
            default: exclude
        - name: from
          in: query
          description: 最多 5 个发送方地址（钱包或代币账户），用英文逗号分隔。
          schema:
            type: string
        - name: to
          in: query
          description: 最多 5 个接收方地址（钱包或代币账户），用英文逗号分隔。
          schema:
            type: string
        - name: counterparty
          in: query
          description: 最多 5 个任一方的地址（钱包或代币账户），用英文逗号分隔。
          schema:
            type: string
        - name: excludeFrom
          in: query
          schema:
            type: string
          description: 排除来自这些地址的转账（最多 5 个，用英文逗号分隔）。
          style: form
          explode: false
        - name: excludeTo
          in: query
          schema:
            type: string
          description: 排除发往这些地址的转账（最多 5 个，用英文逗号分隔）。
          style: form
          explode: false
        - name: minAmount
          in: query
          schema:
            type: number
            minimum: 0
          description: 最小数量，以代币单位（`uiAmount`）计，包含边界值。
        - name: maxAmount
          in: query
          schema:
            type: number
            minimum: 0
          description: 最大数量，以代币单位（`uiAmount`）计，包含边界值。
        - name: minValue
          in: query
          schema:
            type: number
            minimum: 0
          description: >-
            转账发生时的最低美元价值，包含边界值。会启用 `historicPrices`，且 `limit` 最多为 100。每页检查接下来的
            `limit` 笔转账并返回其中匹配的转账，因此即使 `hasMore` 为 `true`，一页也可能更少，甚至为空。
        - name: maxValue
          in: query
          schema:
            type: number
            minimum: 0
          description: 转账发生时的最高美元价值，包含边界值。会启用 `historicPrices`，且 `limit` 最多为 100。
        - name: historicPrices
          in: query
          schema:
            type: boolean
            default: false
          description: >-
            为每笔转账添加 `price.usd` 和 `value.usd`：代币的美元价格取自转账时或之前最近一根 1 分钟 K
            线，最多早一小时，否则为 `null`。USDC、USDT 和 USD1 按 1 计价。不启用时，转账不包含 `price` 和
            `value`。
        - name: grouped
          in: query
          description: 同时返回 `transactions`：本页转账按交易分组，包含合计、`dex` 和兑换识别。
          schema:
            type: boolean
            default: false
        - name: excludeZero
          in: query
          schema:
            type: boolean
            default: false
          description: 排除数量为零的转账。
      responses:
        '200':
          description: 该地址的转账
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountTransfersResponse'
              example:
                account: GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3
                transfers:
                  - signature: >-
                      2VxcHt8HKSt2T2EuUZLyWPsEKz4H4BPreWV28aZDEzoaHG4Fsu232oKKeQqpVqsSYaf3vv8KN7UoZ4MPJA8vw9EF
                    status: success
                    type: spl
                    direction: in
                    from:
                      address: C2RjaMN2NeYAErS6KiBjPQhHCt95J8mCmmLiQqZXPisR
                      owner: BfG7WYmravgBhNdWpGoiFmF8L1duw2vdqdDHiZid2hoJ
                    to:
                      address: D9CEogjHA6CpS12F8St9zpSco7pQKJB5uR1RqDsuzQZk
                      owner: GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3
                    token:
                      name: USD Coin
                      symbol: USDC
                      mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      image: >-
                        https://image.solanatracker.io/proxy?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolana-labs%2Ftoken-list%2Fmain%2Fassets%2Fmainnet%2FEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v%2Flogo.png
                      decimals: 6
                    amount: '25000000'
                    uiAmount: '25'
                    decimals: 6
                    price:
                      usd: 1
                    value:
                      usd: 25
                    timestamp: 1792483949
                    slot: 459159504
                pagination:
                  next: >-
                    st1.eyJjIjpudWxsLCJrIjoiMlZ4Y0h0OEhLU3QyVDJFdVVaTHlXUHNFS3o0SDRCUHJlV1YyOGFaREV6b2FIRzRGc3UyMzJvS0tlUXFwVnFzU1lhZjN2djhLTjdVb1o0TVBKQTh2dzlFRjoyOi0xIn0
                  hasMore: true
                  count: 1
        '400':
          description: >-
            地址、筛选或游标无效，或参数未知。错误消息会指出具体参数，例如 `limit must be an integer from 1 to
            1000` 或 `unknown parameter timeStart; use start`。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: 转账历史暂时不可用。请重试请求。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 历史价格暂时不可用（使用 `minValue` 或 `maxValue` 时）。请重试该请求。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: shell
          label: USDC received
          source: >-
            curl --get
            "https://data.solanatracker.io/account/GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3/transfers"
            \
              --header "x-api-key: YOUR_API_KEY" \
              --data-urlencode "mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" \
              --data-urlencode "direction=in" \
              --data-urlencode "historicPrices=true" \
              --data-urlencode "limit=50"
        - lang: javascript
          label: Page through history
          source: |
            const address = "GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3";
            let cursor;

            do {
              const url = new URL(`https://data.solanatracker.io/account/${address}/transfers`);
              url.search = new URLSearchParams({ limit: "100", historicPrices: "true", ...(cursor && { cursor }) });
              const response = await fetch(url, { headers: { "x-api-key": "YOUR_API_KEY" } });
              if (!response.ok) throw new Error((await response.json()).error);
              const page = await response.json();

              for (const t of page.transfers) {
                console.log(t.direction, t.uiAmount, t.token.symbol, t.value.usd, t.signature);
              }
              cursor = page.pagination.next;
            } while (cursor);
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            // USDC received over the last week, worth at least $10 at the time.

            const data = await
            client.getAccountTransfers('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF',
            {
              direction: 'in',
              mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
              minValue: 10,
              start: Math.floor(Date.now() / 1000) - 7 * 86400,
              limit: 100,
            });


            // Pass grouped: true for one entry per transaction, or use

            // client.iterateAccountTransfers() with the same filters to page
            through every result.
      x-code-samples:
        - lang: shell
          label: USDC received
          source: >-
            curl --get
            "https://data.solanatracker.io/account/GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3/transfers"
            \
              --header "x-api-key: YOUR_API_KEY" \
              --data-urlencode "mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" \
              --data-urlencode "direction=in" \
              --data-urlencode "historicPrices=true" \
              --data-urlencode "limit=50"
        - lang: javascript
          label: Page through history
          source: |
            const address = "GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3";
            let cursor;

            do {
              const url = new URL(`https://data.solanatracker.io/account/${address}/transfers`);
              url.search = new URLSearchParams({ limit: "100", historicPrices: "true", ...(cursor && { cursor }) });
              const response = await fetch(url, { headers: { "x-api-key": "YOUR_API_KEY" } });
              if (!response.ok) throw new Error((await response.json()).error);
              const page = await response.json();

              for (const t of page.transfers) {
                console.log(t.direction, t.uiAmount, t.token.symbol, t.value.usd, t.signature);
              }
              cursor = page.pagination.next;
            } while (cursor);
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            // USDC received over the last week, worth at least $10 at the time.

            const data = await
            client.getAccountTransfers('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF',
            {
              direction: 'in',
              mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
              minValue: 10,
              start: Math.floor(Date.now() / 1000) - 7 * 86400,
              limit: 100,
            });


            // Pass grouped: true for one entry per transaction, or use

            // client.iterateAccountTransfers() with the same filters to page
            through every result.
components:
  schemas:
    AccountTransfersResponse:
      type: object
      required:
        - account
        - transfers
        - pagination
      properties:
        account:
          type: string
        grouped:
          type: boolean
          description: '`grouped=true` 时出现且为 true'
        transfers:
          type: array
          items:
            $ref: '#/components/schemas/AccountTransfer'
          description: 本页的转账。`grouped=true` 时为所返回交易的全部转账。
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/TransferTransaction'
          description: 仅 `grouped=true`
        pagination:
          type: object
          properties:
            next:
              type:
                - string
                - 'null'
              description: 作为 `cursor` 传入以获取下一页
            hasMore:
              type: boolean
            count:
              type: integer
              description: 本页的转账数（分组时为交易数）
            transferCount:
              type: integer
              description: 仅 `grouped=true`：本页的转账数
        enrichmentStatus:
          type: string
          enum:
            - partial
          description: 价格查询超时时出现：未找到的价格为 null。此类页面不会被缓存。
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
    AccountTransfer:
      type: object
      required:
        - signature
        - status
        - type
        - direction
        - from
        - to
        - token
        - amount
        - uiAmount
        - decimals
        - timestamp
        - slot
      properties:
        signature:
          type: string
        status:
          type: string
          enum:
            - success
            - failed
        type:
          type: string
          enum:
            - sol
            - spl
        direction:
          type: string
          enum:
            - in
            - out
          description: 相对于请求的地址
        from:
          $ref: '#/components/schemas/TransferParty'
        to:
          $ref: '#/components/schemas/TransferParty'
        token:
          $ref: '#/components/schemas/TransferToken'
        amount:
          type: string
          description: 以基础单位计的原始数量
        uiAmount:
          type: string
          description: 精确的十进制数量
        decimals:
          type: integer
        price:
          type: object
          required:
            - usd
          properties:
            usd:
              type:
                - number
                - 'null'
          description: 转账发生时的美元价格。仅在 `historicPrices=true` 或使用价值筛选时返回；找不到价格时 `usd` 为 null。
        value:
          type: object
          required:
            - usd
          properties:
            usd:
              type:
                - number
                - 'null'
          description: '`uiAmount` × 价格。仅在 `historicPrices=true` 或使用价值筛选时返回。'
        timestamp:
          type:
            - integer
            - 'null'
          description: 区块时间，Unix 秒
        slot:
          type:
            - integer
            - 'null'
    TransferTransaction:
      type: object
      properties:
        signature:
          type: string
        status:
          type: string
          enum:
            - success
            - failed
          description: 交易结果
        timestamp:
          type:
            - integer
            - 'null'
        slot:
          type:
            - integer
            - 'null'
        type:
          type: string
          enum:
            - swap
            - transfer
          description: '`dex` 为 true 时为 `swap`，否则为 `transfer`'
        dex:
          type: boolean
          description: 交易有 DEX 活动时为 `true`（参阅 `dex`）
        direction:
          type: string
          enum:
            - in
            - out
            - both
            - swap
          description: '`dex` 为 true 时为 `swap`；否则为 `in`、`out`，交易双向转移代币时为 `both`'
        legs:
          type: integer
          description: 此交易中的转账
        totals:
          type: object
          properties:
            value:
              type: object
              required:
                - usd
              properties:
                usd:
                  type:
                    - number
                    - 'null'
              description: 转入加转出的美元总额。仅在 `historicPrices=true` 或使用价值筛选时返回。
            in:
              type: object
              description: >-
                该侧只有一种代币时为该代币的合计；否则为 `legs`。`usd` 仅在 `historicPrices=true`
                或使用价值筛选时返回。
              properties:
                usd:
                  type:
                    - number
                    - 'null'
                legs:
                  type: integer
                token:
                  $ref: '#/components/schemas/TransferToken'
                amount:
                  type: string
                uiAmount:
                  type: string
                decimals:
                  type: integer
                price:
                  type: object
                  required:
                    - usd
                  properties:
                    usd:
                      type:
                        - number
                        - 'null'
                  description: 仅在 `historicPrices=true` 或使用价值筛选时返回。
                value:
                  type: object
                  required:
                    - usd
                  properties:
                    usd:
                      type:
                        - number
                        - 'null'
                  description: 仅在 `historicPrices=true` 或使用价值筛选时返回。
            out:
              type: object
              description: >-
                该侧只有一种代币时为该代币的合计；否则为 `legs`。`usd` 仅在 `historicPrices=true`
                或使用价值筛选时返回。
              properties:
                usd:
                  type:
                    - number
                    - 'null'
                legs:
                  type: integer
                token:
                  $ref: '#/components/schemas/TransferToken'
                amount:
                  type: string
                uiAmount:
                  type: string
                decimals:
                  type: integer
                price:
                  type: object
                  required:
                    - usd
                  properties:
                    usd:
                      type:
                        - number
                        - 'null'
                  description: 仅在 `historicPrices=true` 或使用价值筛选时返回。
                value:
                  type: object
                  required:
                    - usd
                  properties:
                    usd:
                      type:
                        - number
                        - 'null'
                  description: 仅在 `historicPrices=true` 或使用价值筛选时返回。
            net:
              type: object
              required:
                - usd
              properties:
                usd:
                  type:
                    - number
                    - 'null'
              description: 转入减转出的美元金额。仅在 `historicPrices=true` 或使用价值筛选时返回。
            tokens:
              type: array
              items:
                $ref: '#/components/schemas/TransferTokenTotal'
        swap:
          type: object
          description: 该地址发出一种代币并收到另一种代币时返回
          properties:
            in:
              $ref: '#/components/schemas/TransferTokenTotal'
            out:
              $ref: '#/components/schemas/TransferTokenTotal'
        transfers:
          type: array
          items:
            $ref: '#/components/schemas/AccountTransfer'
    TransferParty:
      type: object
      required:
        - address
        - owner
      properties:
        address:
          type: string
          description: SPL 转账为代币账户，SOL 转账为钱包
        owner:
          type: string
          description: 转账发生时拥有 `address` 的钱包
        identity:
          type: object
          additionalProperties: true
          description: 已知钱包身份（KOL、交易所、池、开发者、SNS 名称和标签）。未知钱包省略此字段。
    TransferToken:
      type: object
      properties:
        name:
          type:
            - string
            - 'null'
        symbol:
          type:
            - string
            - 'null'
        mint:
          type: string
          description: SOL 为 `So11111111111111111111111111111111111111112`
        image:
          type:
            - string
            - 'null'
        decimals:
          type: integer
    TransferTokenTotal:
      type: object
      properties:
        token:
          $ref: '#/components/schemas/TransferToken'
        direction:
          type: string
          enum:
            - in
            - out
        amount:
          type: string
        uiAmount:
          type: string
        decimals:
          type: integer
        price:
          type: object
          required:
            - usd
          properties:
            usd:
              type:
                - number
                - 'null'
          description: 仅在 `historicPrices=true` 或使用价值筛选时返回。
        value:
          type: object
          required:
            - usd
          properties:
            usd:
              type:
                - number
                - 'null'
          description: 仅在 `historicPrices=true` 或使用价值筛选时返回。
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 用于鉴权的 API Key

````

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