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

# حساب عرض السعر (إدخال أساسي)

> حساب مبلغ الإخراج المتوقع عند مبادلة مبلغ إدخال ثابت.
مفيد لعرض معاينة قبل بناء المعاملة.




## OpenAPI

````yaml /ar/api-reference/openapi/route-api-v2.yaml get /compute/swap-base-in
openapi: 3.0.3
info:
  title: واجهة معاملات Raydium (Route V2)
  version: 1.0.0
  description: >
    منشئ معاملات swap من جانب الخادم على Solana. تُنتج هذه الواجهة معاملات swap
    مسلسلة دون احتياج العملاء لتشغيل اتصال RPC أو Raydium SDK الكامل.


    تتبع الردود صيغة مغلفة معيارية:

    - **نجاح**: `{ id: string, success: true, data: {...} }`

    - **خطأ**: `{ id: string, success: false, msg: string }`
  contact:
    name: Raydium
    url: https://raydium.io
servers:
  - url: https://transaction-v1.raydium.io
    description: Mainnet
  - url: https://transaction-v1-devnet.raydium.io
    description: Devnet
security: []
tags:
  - name: Compute
    description: نقاط نهاية للقراءة فقط لحساب عروض الأسعار (بدون بناء معاملات).
  - name: Transaction
    description: بناء معاملات swap مسلسلة جاهزة للتوقيع والبث.
paths:
  /compute/swap-base-in:
    get:
      tags:
        - Compute
      summary: حساب عرض السعر (إدخال أساسي)
      description: |
        حساب مبلغ الإخراج المتوقع عند مبادلة مبلغ إدخال ثابت.
        مفيد لعرض معاينة قبل بناء المعاملة.
      operationId: computeSwapBaseIn
      parameters:
        - name: inputMint
          in: query
          required: true
          schema:
            type: string
          description: عنوان mint لرمز الإدخال (مفتاح عام مشفر بـ base58).
          example: EPjFWdd5Au5WrWSNY8jk5oHE3TkM3TvhEhBNj9xtJzwQ
        - name: outputMint
          in: query
          required: true
          schema:
            type: string
          description: عنوان mint لرمز الإخراج (مفتاح عام مشفر بـ base58).
          example: So11111111111111111111111111111111111111112
        - name: amount
          in: query
          required: true
          schema:
            type: string
          description: >-
            مبلغ الإدخال بالـ lamports (أصغر وحدة رموز SPL). يجب أن يكون سلسلة
            نصية لعدد صحيح غير سالب.
          example: '1000000'
        - name: slippageBps
          in: query
          required: true
          schema:
            type: string
          description: تفاوت الانزلاق الأقصى بالنقاط الأساسية (0–10000). 1 bps = 0.01%.
          example: '50'
        - name: referrerBps
          in: query
          required: false
          schema:
            type: string
          description: >-
            رسم الإحالة الاختياري بالنقاط الأساسية (0–10000). يُستخدم فقط إذا
            كان لديك سلطة إحالة.
          example: '100'
        - name: txVersion
          in: query
          required: true
          schema:
            type: string
            enum:
              - V0
              - LEGACY
          description: >-
            إصدار معاملة Solana. V0 يستخدم جداول البحث عن العناوين؛ LEGACY هو
            الصيغة التقليدية.
          example: V0
      responses:
        '200':
          description: تم حساب عرض السعر بنجاح.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComputeSwapResponse'
        '400':
          description: معاملات إدخال غير صحيحة.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ComputeSwapResponse:
      type: object
      properties:
        id:
          type: string
          description: معرّف الطلب الفريد (UUID).
          example: 550e8400-e29b-41d4-a716-446655440000
        success:
          type: boolean
          description: ما إذا كان الحساب قد نجح.
          example: true
        version:
          type: string
          description: إصدار استجابة الواجهة.
          example: V1
        data:
          type: object
          description: نتيجة حساب swap.
          properties:
            inputAmount:
              type: string
              description: مبلغ الإدخال بالوحدة الأصغر.
            outputAmount:
              type: string
              description: مبلغ الإخراج المتوقع (مع مراعاة الانزلاق).
            priceImpact:
              type: string
              description: نسبة تأثير السعر (مثلاً، "0.5" لنسبة 0.5%).
            routes:
              type: array
              description: مصفوفة من مسارات swap والمجمعات المستخدمة.
              items:
                type: object
    ErrorResponse:
      type: object
      properties:
        id:
          type: string
          description: معرّف طلب فريد.
        success:
          type: boolean
          example: false
        version:
          type: string
          example: V1
        msg:
          type: string
          description: 'رمز رسالة خطأ (مثلاً: REQ_SLIPPAGE_BPS_ERROR أو REQ_WALLET_ERROR).'

````