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

# sendTransaction (Sender)

> Gửi giao dịch với độ trễ cực thấp bằng định tuyến đa đường qua Helius, Jito, Harmonic, Rakurai và nhiều nền tảng khác.

## Tham số yêu cầu

<ParamField body="swqos_only" type="boolean" default="false">
  Khi là true, chỉ định tuyến qua cơ sở hạ tầng SWQOS, nhưng yêu cầu mức tip tối thiểu thấp hơn.
</ParamField>

<ParamField body="mev-protect" type="boolean" default="false">
  Khi là true, giao dịch của bạn được định tuyến tránh xa các trình xác thực có liên hệ về mặt thống kê với các cuộc tấn công sandwich. Chọn tham gia theo từng yêu cầu.
</ParamField>

<ParamField body="transaction" type="string" required>
  Giao dịch được mã hóa bằng base64.
</ParamField>

<ParamField body="encoding" type="string">
  Định dạng mã hóa dữ liệu dùng cho payload giao dịch Solana.

  * `base58`
  * `base64`
</ParamField>

<ParamField body="skipPreflight" type="boolean">
  Khi là true, bỏ qua bước xác thực giao dịch preflight của Solana để gửi nhanh hơn. Không bắt buộc — Sender hỗ trợ kiểm tra preflight.
</ParamField>

<ParamField body="maxRetries" type="number">
  Số lần thử lại tự động tối đa. Nên đặt thành 0.
</ParamField>


## OpenAPI

````yaml vi/openapi/sender-api/sendTransaction.yaml POST /fast
openapi: 3.1.0
info:
  title: Helius Sender API
  version: 1.0.0
  description: >-
    Gửi giao dịch Solana với độ trễ cực thấp bằng định tuyến đa đường qua
    Helius, Jito, Harmonic, Rakurai và nhiều nền tảng khác.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://sender.helius-rpc.com
    description: Điểm cuối HTTPS toàn cầu (dành cho các ứng dụng frontend)
  - url: http://slc-sender.helius-rpc.com
    description: Salt Lake City
  - url: http://ewr-sender.helius-rpc.com
    description: Newark
  - url: http://lon-sender.helius-rpc.com
    description: London
  - url: http://fra-sender.helius-rpc.com
    description: Frankfurt
  - url: http://ams-sender.helius-rpc.com
    description: Amsterdam
  - url: http://sg-sender.helius-rpc.com
    description: Singapore
  - url: http://tyo-sender.helius-rpc.com
    description: Tokyo
security: []
paths:
  /fast:
    post:
      tags:
        - Sender
      summary: sendTransaction
      description: >
        Gửi giao dịch qua Helius Sender với độ trễ cực thấp bằng định tuyến đa
        đường qua Helius, Jito, Harmonic, Rakurai và nhiều nền tảng khác.
      operationId: sendTransaction
      parameters:
        - name: api-key
          in: query
          required: false
          schema:
            type: string
          description: >-
            Người dùng tiêu chuẩn không cần khóa API. Chỉ những người dùng có
            giới hạn TPS tùy chỉnh mới cần cung cấp khóa API.
        - name: swqos_only
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Khi là true, giao dịch chỉ được định tuyến qua cơ sở hạ tầng SWQOS,
            nhưng yêu cầu tiền boa tối thiểu thấp hơn.
        - name: mev-protect
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Khi là true, giao dịch của bạn được định tuyến tránh xa các trình
            xác thực có liên hệ về mặt thống kê với các cuộc tấn công sandwich.
            Bạn có thể chọn bật cho từng yêu cầu.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: Phiên bản giao thức JSON-RPC.
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: Mã định danh duy nhất cho yêu cầu.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - sendTransaction
                  description: Tên của phương thức RPC cần gọi.
                  example: sendTransaction
                  default: sendTransaction
                params:
                  type: array
                  description: Các tham số để gửi giao dịch qua Sender.
                  default:
                    - >-
                      Ab/WBgJxCprwWlK2fCxSwm9KrWlJQW8TdnYqXMvg5KropeLqHaa5yJeoWUb+LsGi6zlfs1Z/jA/RgJW++tBhPAKAAQACBGuePYZrXq9Jj+DwkquiMvsrNU5rlcAbmRfuAYui/CwAQr437DqfrFoSt1BSgM/2/0Iqja1QMefnu1hTYX96AA0DBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhWHa4WfUT12o+cyi2WGwfBvngyurXf5VQd4Ukn+5ZSIDAgAFAqCGAQACAAkDQA0DAAAAAAADAgABDAIAAABAQg8AAAAAAAA=
                    - encoding: base64
                      skipPreflight: true
                      maxRetries: 0
                  items:
                    oneOf:
                      - type: string
                        description: Giao dịch được mã hóa bằng base64.
                      - type: object
                        description: Các tùy chọn cấu hình để gửi giao dịch.
                        properties:
                          encoding:
                            type: string
                            description: >-
                              Định dạng mã hóa dữ liệu được dùng cho tải trọng
                              giao dịch Solana.
                            enum:
                              - base58
                              - base64
                            example: base64
                          skipPreflight:
                            type: boolean
                            description: >-
                              Khi là true, bỏ qua bước xác thực giao dịch trước
                              khi thực thi của Solana để gửi nhanh hơn. Không
                              bắt buộc — Sender hỗ trợ kiểm tra trước khi thực
                              thi.
                            example: false
                          maxRetries:
                            type: integer
                            description: Số lần thử lại tự động tối đa. Nên đặt thành 0.
                            example: 0
      responses:
        '200':
          description: >-
            Đã gửi giao dịch thành công. Phản hồi 200 không đảm bảo giao dịch
            hợp lệ hoặc sẽ được ghi nhận trên chuỗi.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: Phiên bản giao thức JSON-RPC.
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: Mã định danh khớp với yêu cầu.
                    example: '1'
                  result:
                    type: string
                    description: Chữ ký giao dịch dùng để theo dõi trạng thái xác nhận.
                    example: >-
                      4qTLpN1sBrp5SzZUKfrSH2897FmxA7AB4EbN4ccgSgEjG9RG2686pSKWhEbz65q4bvaRsdpKRJKZ3dkdGZA78u5s
              example:
                jsonrpc: '2.0'
                id: '1'
                result: >-
                  4qTLpN1sBrp5SzZUKfrSH2897FmxA7AB4EbN4ccgSgEjG9RG2686pSKWhEbz65q4bvaRsdpKRJKZ3dkdGZA78u5s
        '400':
          description: >-
            Yêu cầu không hợp lệ - Thiếu tiền boa, phí ưu tiên hoặc các tham số
            gửi không hợp lệ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Yêu cầu không hợp lệ
                id: '1'
        '429':
          description: Quá nhiều yêu cầu - Đã vượt quá giới hạn tốc độ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Quá nhiều yêu cầu
                id: '1'
        '500':
          description: Lỗi máy chủ nội bộ - Đã xảy ra lỗi trên máy chủ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Lỗi nội bộ
                id: '1'
        '503':
          description: Dịch vụ không khả dụng - Dịch vụ tạm thời không khả dụng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Dịch vụ không khả dụng
                id: '1'
        '504':
          description: Hết thời gian chờ cổng kết nối - Yêu cầu đã hết thời gian chờ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Hết thời gian chờ cổng kết nối
                id: '1'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: Phiên bản giao thức JSON-RPC.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Mã lỗi.
              example: -32602
            message:
              type: string
              description: Thông báo lỗi.
            data:
              type: object
              description: Dữ liệu bổ sung về lỗi.
        id:
          type: string
          description: Mã định danh khớp với yêu cầu.
          example: '1'

````