> ## 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 POST /v2/dex/{chain}/create
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}/create:
    post:
      tags:
        - Dex
      summary: Dex - 创建代币
      description: 在指定 DEX 上创建新代币
      operationId: create.token
      parameters:
        - name: chain
          required: true
          in: path
          description: 支持网络列表中的链名称
          schema:
            $ref: '#/components/schemas/ChainSymbol'
      requestBody:
        required: true
        description: Token creation parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenInput'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTokenReply'
      security:
        - bearer: []
components:
  schemas:
    ChainSymbol:
      type: string
      enum:
        - sol
        - bsc
        - eth
    CreateTokenInput:
      type: object
      properties:
        dex:
          type: string
          description: 交易所使用的 DEX 标识符
          example: raydium
          enum:
            - raydium
            - pumpfun
            - moonshot
            - candy
            - launchpad
        userAddress:
          type: string
          description: 发起交易的钱包公钥
          example: oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7
          minLength: 8
          maxLength: 64
        priorityFee:
          type: string
          description: 优先费（SOL），用于提高交易处理速度
          example: '1000'
        name:
          type: string
          description: 要创建的代币名称
          example: Candy Token
          minLength: 1
          maxLength: 32
        symbol:
          type: string
          description: 代币符号/简称
          example: CANDY
          minLength: 1
          maxLength: 10
        uri:
          type: string
          description: 代币元数据 URI（通常指向图片或 JSON）
          example: https://assets.candyproject.com/token/icon.png
        image:
          type: string
          description: 代币图片 URL（Base64 或 HTTPS）
          example: https://assets.candyproject.com/token/icon.png
        extra:
          type: object
          description: 已创建代币的附加元数据
          example:
            decimals: 6
            migrateType: amm
            slippage: 100
            buyAmount: 0
            supply: 1000000000000000
            totalSellA: 793100000000000
            totalFundRaisingB: 85000000000
            totalLockedAmount: 0
            cliffPeriod: 0
            unlockPeriod: 0
            shareFeeReceiver: oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7
            shareFeeRate: 1000
      required:
        - dex
        - userAddress
        - name
        - symbol
    CreateTokenReply:
      type: object
      properties:
        serializedTx:
          type: string
          description: Base64 编码的代币创建交易
          example: >-
            AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
        mintAddress:
          type: string
          description: 需要签名的代币铸造地址
          example: So11111111111111111111111111111111111111112
      required:
        - serializedTx
        - mintAddress
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````