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

# Get token approval data

> Get approval transaction data for a DEX swap

Returns a list of required token approval transactions for the specified route.
This endpoint should be polled until an empty approvals list is returned,
indicating that all necessary approvals have been granted.

Returns either approval transactions or permit signatures depending on
token and swap provider support. If the token supports EIP-2612 permits
and the swap provider is configured for it, signatures will be returned



## OpenAPI

````yaml https://api-partner.houdiniswap.com/v2/openapi.json post /dex/approve
openapi: 3.0.0
info:
  title: houdiniswap-backend
  version: 2.1.1
  description: Houdiniswap Backend
  license:
    name: ISC
  contact: {}
servers:
  - url: https://api-partner.houdiniswap.com/v2
security: []
paths:
  /dex/approve:
    post:
      tags:
        - DEX
      summary: Get token approval data
      description: >-
        Get approval transaction data for a DEX swap


        Returns a list of required token approval transactions for the specified
        route.

        This endpoint should be polled until an empty approvals list is
        returned,

        indicating that all necessary approvals have been granted.


        Returns either approval transactions or permit signatures depending on

        token and swap provider support. If the token supports EIP-2612 permits

        and the swap provider is configured for it, signatures will be returned
      operationId: Approve
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalResponse'
        '422':
          description: Validation Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
components:
  schemas:
    ApproveRequest:
      properties:
        quoteId:
          type: string
          description: Quote ID from a prior quote response.
          example: 69a02882f48d56c923119d95
        addressFrom:
          type: string
          description: Address from which the amount will be deducted (EVM or Tron)
          example: '0xb7dE6b6eEBF7401aFea5a49D6405C9048fEf2d40'
          pattern: ^(0x[0-9a-fA-F]{40}|T[1-9A-HJ-NP-Za-km-z]{33})$
        usePermit:
          type: boolean
          description: >-
            Whether to use permit instead of approve. Defaults to true for swaps
            that support it.
          example: false
      required:
        - quoteId
        - addressFrom
      type: object
      additionalProperties: false
    ApprovalResponse:
      properties:
        approvals:
          items:
            $ref: '#/components/schemas/ApproveTransaction'
          type: array
        signatures:
          items:
            $ref: '#/components/schemas/ApprovalTypedData'
          type: array
      required:
        - approvals
        - signatures
      type: object
      additionalProperties: false
    ValidationError:
      properties:
        message:
          type: string
        code:
          type: string
        requestId:
          type: string
        fields:
          $ref: '#/components/schemas/FieldErrors'
      required:
        - message
        - code
        - fields
      type: object
      additionalProperties: false
    ErrorResponse:
      properties:
        message:
          type: string
        code:
          type: string
        requestId:
          type: string
      required:
        - message
        - code
      type: object
      additionalProperties: false
    ApproveTransaction:
      properties:
        data:
          type: string
        to:
          type: string
        from:
          type: string
        fromChain:
          $ref: '#/components/schemas/Chain'
      required:
        - data
        - to
        - from
        - fromChain
      type: object
      additionalProperties: false
    ApprovalTypedData:
      properties:
        data:
          $ref: '#/components/schemas/EIP712TypedData'
        type:
          $ref: '#/components/schemas/SignatureType'
        totalSteps:
          type: number
          format: double
        step:
          type: number
          format: double
        isComplete:
          type: boolean
        key:
          type: string
        swapRequiredMetadata:
          $ref: '#/components/schemas/Record_string.any_'
      required:
        - data
        - type
        - totalSteps
        - step
        - isComplete
        - key
      type: object
      additionalProperties: false
    FieldErrors:
      properties: {}
      type: object
      additionalProperties:
        properties:
          value: {}
          message:
            type: string
        required:
          - message
        type: object
    Chain:
      properties:
        icon:
          type: string
        addressValidation:
          type: string
        tokenAddressValidation:
          type: string
        id:
          type: string
        created:
          type: string
          format: date-time
        modified:
          type: string
          format: date-time
        name:
          type: string
        shortName:
          type: string
        memoNeeded:
          type: boolean
          nullable: true
        hashUrl:
          type: string
        explorerUrl:
          type: string
        addressUrl:
          type: string
        priority:
          type: number
          format: double
        kind:
          type: string
        chainId:
          type: number
          format: double
          nullable: true
        enabled:
          type: boolean
        shortNameV1:
          type: string
      required:
        - icon
        - addressValidation
        - tokenAddressValidation
        - id
        - created
        - name
        - shortName
        - explorerUrl
        - addressUrl
        - kind
        - enabled
        - shortNameV1
      type: object
      additionalProperties: false
    EIP712TypedData:
      properties:
        domain:
          $ref: '#/components/schemas/TypedDataDomain'
        types:
          $ref: '#/components/schemas/Record_string.TypedDataField-Array_'
        primaryType:
          type: string
        message:
          $ref: '#/components/schemas/Record_string.any_'
      required:
        - domain
        - types
        - primaryType
        - message
      type: object
      additionalProperties: false
    SignatureType:
      enum:
        - single
        - chained
      type: string
    Record_string.any_:
      properties: {}
      additionalProperties: {}
      type: object
      description: Construct a type with a set of properties K of type T
    TypedDataDomain:
      properties:
        name:
          type: string
        version:
          type: string
        chainId:
          type: number
          format: double
        verifyingContract:
          type: string
        salt:
          type: string
      type: object
      additionalProperties: false
    Record_string.TypedDataField-Array_:
      properties: {}
      additionalProperties:
        items:
          $ref: '#/components/schemas/TypedDataField'
        type: array
      type: object
      description: Construct a type with a set of properties K of type T
    TypedDataField:
      properties:
        name:
          type: string
        type:
          type: string
      required:
        - name
        - type
      type: object
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: apiKey
      name: Authorization
      in: header

````