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

# Dex - 報價

> 取得 DEX 交易報價資訊



## OpenAPI

````yaml /zh-Hant/api-reference/openapi-defi-zh-Hant.yaml GET /v2/dex/{chain}/quote
openapi: 3.1.0
info:
  title: Defi Service API
  description: Defi Service API ⚡️
  version: '1.0'
  contact:
    name: AI
    url: https://github.com/chainstream-io/defi-service
    email: ai@sx.ai
servers:
  - url: https://api.chainstream.io
    description: Production
security: []
tags:
  - name: Endpoints
    description: ''
paths:
  /v2/dex/{chain}/quote:
    get:
      tags:
        - Dex
      summary: Dex - 取得報價
      description: 取得 DEX 交易報價資訊
      operationId: quote
      parameters:
        - name: chain
          required: true
          in: path
          description: 支援網路列表中的鏈名稱
          schema:
            $ref: '#/components/schemas/ChainSymbol'
        - name: dex
          required: true
          in: query
          description: DEX 協議類型
          schema:
            example: raydium
            enum:
              - raydium
              - pumpfun
            type: string
        - name: amount
          required: true
          in: query
          description: 交易數量
          schema:
            example: 1000000000
            type: string
        - name: inputMint
          required: true
          in: query
          description: 輸入代幣地址
          schema:
            example: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
            type: string
        - name: outputMint
          required: true
          in: query
          description: 輸出代幣地址
          schema:
            example: So11111111111111111111111111111111111111112
            type: string
        - name: exactIn
          required: true
          in: query
          description: 精確輸入模式
          schema:
            default: true
            example: true
            type: boolean
        - name: slippage
          required: true
          in: query
          description: 滑點容忍度
          schema:
            format: int64
            example: 10
            type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DexQuoteResponse'
      security:
        - bearer: []
components:
  schemas:
    ChainSymbol:
      type: string
      enum:
        - sol
        - bsc
        - eth
    DexQuoteResponse:
      type: object
      properties:
        amountOut:
          type: string
          description: 輸出數量
          example: '1000000000'
        minAmountOut:
          type: string
          description: 最小輸出數量
        currentPrice:
          type: string
          description: 目前價格
        executionPrice:
          type: string
          description: 執行價格
        priceImpact:
          type: string
          description: 價格影響
          example: '10.5'
        fee:
          type: string
          description: 交易手續費
          example: '1000000000'
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````