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

# Get quote to swap native token to an ERC20 token



## OpenAPI

````yaml /openapi.json post /api/v1/evm-exchange/price/native-to-token
openapi: 3.0.0
info:
  title: Mr Monei API Gateway
  description: External API for partners using API Key authentication
  version: '1.0'
  contact: {}
servers:
  - url: https://api.dev.monei.cc
    description: Dev Server
  - url: https://api.monei.cc
    description: Live Server
security: []
tags: []
paths:
  /api/v1/evm-exchange/price/native-to-token:
    post:
      tags:
        - EVM Exchange
      summary: Get quote to swap native token to an ERC20 token
      operationId: EvmExchangeController_swapNativeToTokenQuote
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapNativeToTokenDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapPriceResponseDto'
      security:
        - bearer: []
        - api-key: []
components:
  schemas:
    SwapNativeToTokenDto:
      type: object
      properties:
        amount:
          type: string
          example: '0.1'
          description: Amount of native token to swap
        amountOut:
          type: string
          example: '0.1'
          description: Amount of native token to swap
        tokenOut:
          type: string
          example: '0x6B175474E89094C44Da98b954EedeAC495271d0F'
          description: Token address to receive
        chainId:
          type: number
          example: 1
          description: Chain ID (e.g., 1 for Ethereum)
      required:
        - amount
        - amountOut
        - tokenOut
        - chainId
    SwapPriceResponseDto:
      type: object
      properties:
        statusCode:
          type: number
        message:
          type: string
        data:
          $ref: '#/components/schemas/SwapPriceDto'
        errors:
          type: object
      required:
        - statusCode
        - message
        - data
        - errors
    SwapPriceDto:
      type: object
      properties:
        quoteId:
          type: string
          description: Quote ID for executing the swap
          example: '0x592dbadfad19da6808b637c2'
        fromToken:
          description: Token you are selling
          allOf:
            - $ref: '#/components/schemas/SimpleTokenDto'
        toToken:
          description: Token you are buying
          allOf:
            - $ref: '#/components/schemas/SimpleTokenDto'
        fromAmount:
          type: string
          description: Amount to sell (in smallest unit)
          example: '100000000000000000'
        toAmount:
          type: string
          description: Amount to receive (in smallest unit)
          example: '313241752841065035585'
        rate:
          type: string
          description: Exchange rate (1 fromToken = X toToken)
          example: '3132.41752841065035585'
        reverseRate:
          type: string
          description: Reverse exchange rate (1 toToken = Y fromToken)
          example: '0.000319'
        minToAmount:
          type: string
          description: Minimum amount you will receive (slippage applied)
          example: '310104629627834539485'
        protocolFee:
          type: string
          description: Protocol fee amount
          example: '470558335793031453'
        protocolFeeToken:
          description: Protocol fee token
          allOf:
            - $ref: '#/components/schemas/SimpleTokenDto'
        estimatedGas:
          type: string
          description: Estimated gas cost in native token
          example: '60012335624148'
        estimatedGasUsd:
          type: string
          description: Estimated gas cost in USD
          example: '18.50'
        priceImpact:
          type: string
          description: Price impact percentage
          example: '0.15'
        liquidityAvailable:
          type: boolean
          description: Whether liquidity is sufficient
          example: true
        totalValueUsd:
          type: string
          description: Total value in USD (estimated)
          example: '313.24'
        expiryTimestamp:
          type: number
          description: Quote expiry timestamp (Unix)
          example: 1698765432
        blockNumber:
          type: string
          description: Block number this quote is based on
          example: '24161093'
        chainId:
          type: number
          description: Chain ID
          example: 1
      required:
        - quoteId
        - fromToken
        - toToken
        - fromAmount
        - toAmount
        - rate
        - reverseRate
        - minToAmount
        - protocolFee
        - protocolFeeToken
        - estimatedGas
        - estimatedGasUsd
        - priceImpact
        - liquidityAvailable
        - totalValueUsd
        - expiryTimestamp
        - blockNumber
        - chainId
    SimpleTokenDto:
      type: object
      properties:
        address:
          type: string
          description: Token address
          example: '0x6b175474e89094c44da98b954eedeac495271d0f'
        symbol:
          type: string
          description: Token symbol
          example: DAI
        decimals:
          type: number
          description: Token decimals
          example: 18
      required:
        - address
        - symbol
        - decimals
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-KEY

````