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

# Get api permitdata

> GET Permit/Approve info or EIP-2612 signature



## OpenAPI

````yaml /openapi.yaml get /api/{blockchain}/permit/data
openapi: 3.1.0
info:
  title: swap-8dx
  description: ''
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://swap.ggp.gg
  - url: https://8dx.io
security: []
tags:
  - name: swap
    description: Swap API endpoints
  - name: approve
    description: Approve (Permit) API endpoints
  - name: explorer
    description: Explorer API endpoints
  - name: order
    description: Limit Order API endpoints
  - name: healthcheck
    description: Health Check API endpoints
paths:
  /api/{blockchain}/permit/data:
    get:
      tags:
        - approve
      description: GET Permit/Approve info or EIP-2612 signature
      operationId: get_permit_data
      parameters:
        - name: blockchain
          in: path
          required: true
          schema:
            type: string
            enum:
              - ethereum
              - bsc
              - arbitrum
        - name: addressTokenIn
          in: query
          description: Source token contract address (ERC20 or native token)
          required: true
          schema:
            type: string
          style: form
        - name: dstAddress
          in: query
          description: Destination/taker wallet or contract
          required: true
          schema:
            type: string
          style: form
        - name: amountIn
          in: query
          description: >-
            Amount of source token to swap (in token's normalized unit, e.g.,
            eth for ETH)
          required: true
          schema:
            type: string
          style: form
      responses:
        '200':
          description: Permit/Approve info or EIP-2612 signature for maker address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermitDataResponse'
        '400':
          description: Bad request error from HTTP server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                BadRequest:
                  summary: Bad request
                  value:
                    code: 400
                    error: string
        '408':
          description: Request timeout error from HTTP server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                RequestTimeout:
                  summary: Request timeout
                  value:
                    code: 408
                    error: string
        '500':
          description: Internal server error from HTTP server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Internal:
                  summary: Internal
                  value:
                    code: 500
                    error: string
components:
  schemas:
    PermitDataResponse:
      type: object
      required:
        - alreadyApproved
        - alreadyPermit
      properties:
        alreadyApproved:
          type: boolean
          description: Whether the token has already been approved
        alreadyPermit:
          type: boolean
          description: Whether the permit has already been signed
        data:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PermitTypes'
    ErrorResponse:
      type: object
      required:
        - error
        - code
      properties:
        code:
          type: integer
          format: int32
          minimum: 0
        error:
          type: string
    PermitTypes:
      type: object
      required:
        - permit
        - typedData
      properties:
        permit:
          type: object
          description: PermitSingle message
        typedData:
          type: object
          description: PermitSingle typed data for 8dx aggregation contract
      examples:
        - permit:
            details:
              amount: '0xffffffffffffffffffffffffffffffffffffffff'
              expiration: '0x69daab1d'
              nonce: '0x0'
              token: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
            sigDeadline: '0x69b46f9d'
            spender: '0xeee3fdcc5b9d7821570294b26070b2f45cfd8aec'
          typedData:
            domain:
              chainId: '0x1'
              name: Permit2
              verifyingContract: '0x000000000022d473030f116ddee9f6b43ac78ba3'
            message:
              details:
                amount: '0xffffffffffffffffffffffffffffffffffffffff'
                expiration: '0x69daab1d'
                nonce: '0x0'
                token: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
              sigDeadline: '0x69b46f9d'
              spender: '0xeee3fdcc5b9d7821570294b26070b2f45cfd8aec'
            primaryType: PermitSingle
            types:
              EIP712Domain:
                - name: name
                  type: string
                - name: chainId
                  type: uint256
                - name: verifyingContract
                  type: address
              PermitDetails:
                - name: token
                  type: address
                - name: amount
                  type: uint160
                - name: expiration
                  type: uint48
                - name: nonce
                  type: uint48
              PermitSingle:
                - name: details
                  type: PermitDetails
                - name: spender
                  type: address
                - name: sigDeadline
                  type: uint256

````