> ## 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 /cn/api-reference/openapi-defi-cn.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

````