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

# Lấy các giao dịch chuyển của ví

> Truy xuất tất cả giao dịch chuyển token và SOL của một địa chỉ ví Solana, có hỗ trợ phân trang.

Mỗi yêu cầu tốn **100 điểm tín dụng**.

## Tham số yêu cầu

<ParamField body="wallet" type="string" required default="GQUtvPx89ZNCwmvQqFmH59bJcU8fW8siETpaxod7Aydz">
  Địa chỉ ví Solana (được mã hóa bằng base58)
</ParamField>

<ParamField body="limit" type="number" default="50">
  Số lượng giao dịch chuyển tối đa cần trả về
</ParamField>

<ParamField body="cursor" type="string">
  Con trỏ phân trang từ phản hồi trước đó
</ParamField>


## OpenAPI

````yaml vi/openapi/wallet-api/openapi.yaml GET /v1/wallet/{wallet}/transfers
openapi: 3.0.3
info:
  title: Wallet API
  description: >
    REST API hiệu năng cao để truy vấn dữ liệu ví Solana, bao gồm số dư, lịch sử
    giao dịch, chuyển khoản và thông tin danh tính.


    ## Xác thực


    Mọi yêu cầu đều cần khóa API được truyền theo một trong hai cách:

    - Tham số truy vấn: `?api-key=YOUR_API_KEY`

    - Tiêu đề: `X-Api-Key: YOUR_API_KEY`
  version: 1.0.0
  contact:
    name: Hỗ trợ API
    url: https://helius.dev
servers:
  - url: https://api.helius.xyz
    description: Máy chủ sản xuất
security:
  - ApiKeyQuery: []
  - ApiKeyHeader: []
tags:
  - name: Danh tính
    description: Tra cứu danh tính ví và các địa chỉ đã biết
  - name: Số dư
    description: Truy vấn số dư token và NFT
  - name: Lịch sử
    description: Lịch sử giao dịch và thay đổi số dư
  - name: Chuyển khoản
    description: Hoạt động chuyển token
  - name: Cấp vốn
    description: Thông tin cấp vốn cho ví
paths:
  /v1/wallet/{wallet}/transfers:
    get:
      tags:
        - Chuyển khoản
      summary: Lấy các giao dịch chuyển token
      description: >
        Truy xuất toàn bộ hoạt động chuyển token của một ví, bao gồm thông tin
        người gửi/người nhận.

        Trả về các giao dịch chuyển theo thứ tự thời gian ngược (mới nhất
        trước).
      operationId: getWalletTransfers
      parameters:
        - $ref: '#/components/parameters/WalletAddress'
        - name: limit
          in: query
          description: Số giao dịch chuyển tối đa cần trả về
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: cursor
          in: query
          description: Con trỏ phân trang từ phản hồi trước
          schema:
            type: string
      responses:
        '200':
          description: Đã truy xuất lịch sử chuyển khoản thành công
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransfersResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    WalletAddress:
      name: wallet
      in: path
      required: true
      description: Địa chỉ ví Solana (được mã hóa base58)
      schema:
        type: string
        pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
        default: GQUtvPx89ZNCwmvQqFmH59bJcU8fW8siETpaxod7Aydz
      example: GQUtvPx89ZNCwmvQqFmH59bJcU8fW8siETpaxod7Aydz
  schemas:
    TransfersResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Transfer'
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - data
        - pagination
    Transfer:
      type: object
      properties:
        signature:
          type: string
          description: Chữ ký giao dịch
          example: 5wHu1qwD7Jsj3xqWjdSEJmYr3Q5f5RjXqjqQJ7jqEj7jqEj7jqEj7jqEj7jqEj7jqE
        timestamp:
          type: integer
          description: Dấu thời gian Unix tính bằng giây
          example: 1704067200
        direction:
          type: string
          enum:
            - in
            - out
          description: Hướng chuyển khoản tương ứng với ví
          example: in
        counterparty:
          type: string
          description: >-
            Bên còn lại trong giao dịch chuyển (người gửi nếu là 'in', người
            nhận nếu là 'out')
          example: HXsKP7wrBWaQ8T2Vtjry3Nj3oUgwYcqq9vrHDM12G664
        mint:
          type: string
          description: >-
            Địa chỉ mint của token (So11111111111111111111111111111111111111112
            đối với SOL)
          example: So11111111111111111111111111111111111111112
        symbol:
          type: string
          nullable: true
          description: Ký hiệu token nếu đã biết
          example: SOL
        amount:
          type: number
          description: Số lượng chuyển (dễ đọc, đã chia theo số chữ số thập phân)
          example: 1.5
        amountRaw:
          type: string
          description: >-
            Số lượng chuyển thô theo đơn vị nhỏ nhất (lamport đối với SOL, số
            lượng token thô đối với token SPL)
          example: '1500000000'
        decimals:
          type: integer
          description: Số chữ số thập phân của token
          example: 9
      required:
        - signature
        - timestamp
        - direction
        - counterparty
        - mint
        - amount
        - amountRaw
        - decimals
    Pagination:
      type: object
      properties:
        hasMore:
          type: boolean
          description: Cho biết còn kết quả hay không
          example: true
        nextCursor:
          type: string
          nullable: true
          description: Con trỏ để tải trang kết quả tiếp theo
          example: 5wHu1qwD7Jsj3xqWjdSEJmYr3Q5f5RjXqjqQJ7jqEj7jqEj7jqEj7jqEj7jqEj7jqE
      required:
        - hasMore
    Error:
      type: object
      properties:
        error:
          type: string
          description: Thông báo lỗi
          example: Địa chỉ ví không hợp lệ
        code:
          type: integer
          description: Mã trạng thái HTTP
          example: 400
        details:
          type: string
          description: Chi tiết bổ sung về lỗi
          example: '''invalid-address'' không phải là địa chỉ Solana hợp lệ'
      required:
        - error
        - code
  responses:
    BadRequest:
      description: Tham số yêu cầu không hợp lệ
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Địa chỉ ví không hợp lệ
            code: 400
            details: '''invalid-address'' không phải là địa chỉ Solana hợp lệ'
    Unauthorized:
      description: Thiếu khóa API hoặc khóa API không hợp lệ
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Cần có khóa API. Truyền qua ?api-key=xxx hoặc tiêu đề X-Api-Key
            code: 401
    RateLimited:
      description: Đã vượt quá giới hạn tốc độ.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: RATE_LIMIT_EXCEEDED
            code: 429
            details: Quá nhiều yêu cầu. Hãy thử lại sau 2 giây.
    InternalError:
      description: Lỗi máy chủ tạm thời. Có thể thử lại với cơ chế lùi theo cấp số nhân.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: INTERNAL_ERROR
            code: 500
            details: Đã xảy ra lỗi không mong muốn. Vui lòng thử lại.
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: Khóa API được truyền dưới dạng tham số truy vấn
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Khóa API được truyền trong tiêu đề yêu cầu

````