> ## 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.

# Swap an ERC20 token to native token



## OpenAPI

````yaml /openapi.json post /api/v1/evm-exchange/token-to-native
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/token-to-native:
    post:
      tags:
        - EVM Exchange
      summary: Swap an ERC20 token to native token
      operationId: EvmExchangeController_swapTokenToNative
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapTokenToNativeDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TxHashResponseDto'
      security:
        - bearer: []
        - api-key: []
components:
  schemas:
    SwapTokenToNativeDto:
      type: object
      properties:
        amount:
          type: string
          example: '0.1'
          description: Amount of native token to swap
        tokenIn:
          type: string
          example: '0x6B175474E89094C44Da98b954EedeAC495271d0F'
          description: Token address to receive
        chainId:
          type: number
          example: 1
          description: Chain ID (e.g., 1 for Ethereum)
      required:
        - amount
        - tokenIn
        - chainId
    TxHashResponseDto:
      type: object
      properties:
        statusCode:
          type: number
        message:
          type: string
        data:
          $ref: '#/components/schemas/TxHashDto'
        errors:
          type: object
      required:
        - statusCode
        - message
        - data
        - errors
    TxHashDto:
      type: object
      properties:
        txHash:
          type: string
      required:
        - txHash
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-KEY

````